Last Updated: May. 26, 2022 at 03:28pm UTC
Class

NFZohoCampaign_CommLogDataHandling

Retrieves, adds structure and filters, returns data from CommLog CommLog is loaded with master init, thus data is available with single DB call. This class enables quick manipulation of a given key within the CommLog data

Author
stuartlb3

Method
__construct public
Method
delimitedData public
Returns keyed records of data delimited into a string
Param
string $key Field key of values to return
Param
string $delimiter Separator between elements
Return
string
Method
constructTableRows public
Construct HTML table of given data keys for cells within each row By default, each entry is on a single row; if field keys are displayed, then each field has its own row
Param
array $keys Field keys for table cells
Param
integer $count Number of records to return
Param
boolean $use_key Display field keys in table -
uses separate row per field
Return
string HTML string constructing table
Method
constructCellMarkup /** * Implodes record into cells, or rows with key/value cells * @param array $record * @param boolean $use_key * @return string */
Method
$array_keys array_map
Method
column public
Returns indexed array of single column
Param
string $key Element key
Return
array|null
Method
filterKeys public
Returns only the desired keyed fields from data
Param
array $keys Array of field names
Return
array|null
Method
latestRecord public
Returns the last element added to data; null if not available
Param
array $keys Specific keys to be returned
Param
boolean $implode Return value as imploded
Return
mixed
Method
getRecordByIndex public
Returns a record by the index value
Param
integer $index
Return
array
Method
allData public
Returns data as stored in options table
Return
array|null
Class

NFZohoCampaign_Constants

Constants for use throughout extension
Set as protected properties with no ability to set

Property
integer $comm_log_record_count Description of sample

Method
__get public
Returns the value of a constant to modify dynamically Applies a filter
Param
string $property
Return
mixec
Class

NFZohoCampaign_Factory

Factory providing instantiated objects

Author
stuartlb3

Class

NFZohoCampaign_FieldMap

Manipulates the configured FieldMapLookup for more advanced handling

Author
stuartlb3

Method
__construct public
Configures the FieldMapLookup
Method
init public
Runs init functions for filtering
Method
modifyFieldMapLookup protected
Method
separateIntoModules protected
Group each field map by Module for quicker handling
Method
extractMultiplesAdvancedCommands protected
Checks if advanced command modifies module count and sets count value
1 is the default, 0 removes from list
Method
iterateMultiples protected
Iterates to call method that adds multiple module values to field lookup
Method
addMultipleModule protected
Adds a multiple to a given module
Duplicates each field in module, adding a delimiter plus the index number to the key and adding a delimiter to the label plus the index number PLUS ONE (because people default counting from 1)
Param
string $module Module for adding multiples
Param
int $counter Index for which multiple to add
Method
removeModules protected
Checks if advanced command removes module, then removes it
Method
recombineFieldMap protected
Recombines separated modules into single field map array
Method
labelKeyPairs public
Method
maxModuleCount public
Returns the count of the highest number of modules Used to set an upper limit on how many times to iterate the field maps
Method
fieldMapLookup public
Returns the full field map lookup as originally configured
Return
array
Class

NFZohoCampaign_MergeTags

Method
__construct public
Method
createListKeyMergeTag protected
Creates List Key merge tag;
Return
null
Method
createSubscriberFieldMergeTags protected
Adds stored subscriber fields as merge tags for simpler field mapping
Return
null
Class

NFZohoCampaign_SupportSettings

Displays support settings on settings page

Author
stuartlb3

Method
__construct public
Method
addSupportAdvancedCommandDescription public
Adds 'support' to Advanced Commands descriptions
Param
array $descriptions
Return
array
Method
extractInjector protected
Extracts settings and objects required of the injector
Method
constructDataHandlers protected
Construct the data handlers for the stored keyed data
Each key in the comm log has a separate object
Method
buildCommStatusHTML protected
Builds Communication Status including messages and troubleshooting
Method
displayRequestLog protected
Displays requests
If 'support' advanced command, display most recent; optional command to display any number of previous records
Return
null
Method
displayFieldMap protected
Displays field map repeaters
If 'support' advanced command, display most recent; optional command to display any number of previous records
Return
null
Method
displayJSONRequest protected
Displays JSON request(s)
If 'support' advanced command, display most recent; optional command to display any number of previous records
Return
null
Method
displayResponseArray protected
Displays JSON request(s)
If 'support' advanced command, display most recent; optional command to display any number of previous records
Return
null
Method
displayWPError protected
Method
removeUnusedSettings protected
Remove settings that have not be built for display
Configured settings have placeholders; rather than unset each one by determining what advanced commands can turn them on or off, compare the configured version with the support version and, if they are the same, remove it because it only has a placeholder value and not of use
Class

NFZohoCampaign_MailingLists_MailingListsMaster

Refreshes and stores a list of mailing lists

Author
stuartlb3

Method
__construct public
Method
pluginSettings public
Adds the configured settings to the master plugin's settings group
Param
array $master_settings Incoming settings from Ninja Forms
Return
array
Method
configureSettings protected
Builds array of plugin settings
Creates link for listener to refresh mailing lists
Return
array Plugin settings
Method
addListenerWebhook public
Static Method
process /** * Triggered by listener to get Subscriber Fields * * @param array $listener Webhook listener array * @param type $response * * @see LB3Tools_Primary_Listener $webhook_listener_array * @see LB3Tools_Primary_Listener->addWebhookListeners */
Triggered by listener to get Subscriber Fields
Param
array $listener Webhook listener array
Param
type $response
See
LB3Tools_Primary_Listener $webhook_listener_array
See
LB3Tools_Primary_Listener->addWebhookListeners
Method
settingsPageMailingListsHTML protected
Returns HTML formatted string for settings page output of Field Names
Return
string
Method
addAdvancedCommandDescriptor public
Adds description to Advanced Commands
Param
array $descriptions Array of incoming desriptions for Advanced Commands
Return
array
Class

NFZohoCampaign_MailingLists_MailingListsProcess

Description of GetSubscriberFieldProcess

Author
stuartlb3

Method
__construct public
Method
refreshMailingLists public
Get Subscriber Fields from API and store in CommLog
Method
logResponseArray protected
Remove redundant data and append response array to CommLog
Local variable set up for unsetting of redundant data to protect class property values in case they are needed elsewhere Adds timestamp as value for 'response_array' key in request_log
Method
initializeRequestLog public
Initializes request log with config'd default and submission data
Class

NFZohoCampaign_Subscribe_SubscribeAction

NF Action that takes form submission and subscribes email to Campaign

Author
stuartlb3

Method
__construct public
Instantiate SubscribeMaster class to add NF Action
Param
array $injector
Method
enqueueAdminScripts public
Method
addFieldMapRepeater public
Adds Field Map Option Repeater to Action Settings
Method
builderTemplates public
Include Template file for option repeater
Method
get_lists public
Implements abstract method of ActionNewsletter class
Method
process public
Class

NFZohoCampaign_Subscribe_SubscribeMaster

Adds NF Action to subscribe email to Zoho Campaign

Author
stuartlb3

Method
__construct public
Instantiate SubscribeMaster class to add NF Action
Param
array $injector
Method
registerActions public
Register the Subscribe Zoho Campaign Action
Param
array $actions
Return
array
Class

NFZohoCampaign_Subscribe_SubscribeProcess

Method
__construct public
Receives form submission data and sends requests to Zoho Campaigns
Param
array $action_settings Submission action settings
Param
integer $form_id Submission form id
Param
array $data Submission form data
Param
array $injector Dependency injector
Param
array $data_to_extract Associative array identifying action_setting key for required data, where the key is a required setting and the value is the action_setting key that holds the submitted data
Method
initializeRequestLog public
Initializes request log with config'd default and submission data
Method
prepareSubmissionData public
Prepare form submission data for API request
Method
subscribeSubmissionData public
Subscribe form submission data using API; stores response array
Method
logResponseArray protected
Remove redundant data and append to CommLog
Method
extractFieldMapRepeaterSubmission protected
Extracts field map repeater data and stores as property
Method
extractListKey protected
Checks for list key in field map and extracts it as separate property
Method
encodeJSONRequest protected
Encodes request for subscribing new email
Method
responseArray public
Returns response values in response array structure
See
Config/ZohoCampaignAPIResponseArray.php
Return
array
Method
extractMergeTag protected
Searches for zohocampaigns: merge tags and returns first found
Param
string $text
Return
string
Class

NFZohoCampaign_SubscriberFields_SubscriberFieldsMaster

Refreshes and stores a list of subscriber fields

Author
stuartlb3

Method
__construct public
Method
addAdvancedCommandDescriptor public
Adds description to Advanced Commands
Param
array $descriptions Array of incoming desriptions for Advanced Commands
Return
array
Method
pluginSettings public
Adds the configured settings to the master plugin's settings group
Param
array $master_settings Incoming settings from Ninja Forms
Return
array
Method
configureSettings protected
Builds array of plugin settings
Creates link for listener to refresh subscriber fields
Return
array Plugin settings
Method
addListenerWebhook public
Static Method
process /** * Triggered by listener to get Subscriber Fields * * @param array $listener Webhook listener array * @param type $response * * @see LB3Tools_Primary_Listener $webhook_listener_array * @see LB3Tools_Primary_Listener->addWebhookListeners */
Triggered by listener to get Subscriber Fields
Param
array $listener Webhook listener array
Param
type $response
See
LB3Tools_Primary_Listener $webhook_listener_array
See
LB3Tools_Primary_Listener->addWebhookListeners
Method
settingsPageSubscriberFieldsHTML protected
Returns HTML formatted string for settings page output of Field Names
Return
string
Class

NFZohoCampaign_SubscriberFields_SubscriberFieldsProcess

Get subscriber fields and store in CommDataLog

Author
stuartlb3

Method
__construct public
Method
refreshSubscriberFields public
Get Subscriber Fields from API and store in CommLog
Method
logResponseArray protected
Remove redundant data and append respone array to CommLog
Local variable set up for unsetting of redundant data to protect class property values in case they are needed elsewhere Adds timestamp as value for 'response_array' key in request_log
Method
initializeRequestLog public
Initializes request log with config'd default and submission data
Class

LB3Tools_Abstracts_AdvancedCommandsAbstract

Method
__construct public
Adds the Advanced Commands setting
Param
string $settings_key NF Settings key where advanced commands field is stored
Method
pluginSettings public
Method
getNinjaFormSetting protected
Retrieves value stored by Ninja_Forms
Param
string $key
Return
mixed
Method
advancedCommands public
Returns the stored advanced codes for the plugin
Stored as comma-delimited, explodes into array of string commands
Return
array Advanced codes as array
Method
isAdvancedCommandSet public
Given an advanced command, evaluates if it is set or not
Param
string $command
Return
bool TRUE is command is set, FALSE if not set
Method
variableAdvancedCommand public
Searches advanced commands for variable values and returns variable
Given a prefixed command, returns suffix, false on fail
Param
string $prefix
Return
string|bool Description
Method
intAdvancedCommmand public
Searches advanced commands for prefixed values and returns integer suffix
Given a prefixed command, returns integer, false on fail
Param
string $prefix
Return
integer|bool Description
Method
arrayAdvancedCommmand public
Searches advanced commands for prefixed values and returns array suffix
Given a prefixed command, returns array, exploded on '-', false on fail
Param
string $prefix
Return
array|bool Description
Class

LB3Tools_AdvancedCommands

Adds filters specified by an Advanced Command
Enables dashboard setting to apply hard coded filters

Author
stuartlb3

Method
__construct public
Adds the Advanced Commands setting
Param
srting $settings_key Key for Ninja Forms setting where advanced commands value is stored
Param
array $injector Array of dependencies
Method
pluginSettings public
Add the Advanced Commands setting
Param
array $master_settings
Return
array
Class

LB3Tools_LB3Tools

Provides tools for simplifying code structure Abstracts are included immediately. AJAX Handler is only included when it is called by another file because some methods in it will fail if called before the correct action hook

Author
stuartlb3

Method
__construct public
Includes classes needed immediately
Param
array $injector Injector used to get version number
Static Method
ajaxHandler /** * Static method includes and returns AjaxHandler for building AJAX requests * @return \LB3Tools\AjaxHandler */
Static method includes and returns AjaxHandler for building AJAX requests
Return
\LB3Tools\AjaxHandler
Class

LB3Tools_Primary_CommDataLog

Manages updates to the communication data log
Retrieves existing db array for starting log; overwrites or appends new communication data; writes log to db

Author
stuartlb3

Method
__construct public
Retrieves existing CommData from db
If incoming value is not an array, sets CommData as empty array
Param
string $db_key WP options table key storing data
Method
initializeCommData public
Retrieves existing CommData from db
If incoming value is not an array, sets CommData as empty array
Param
string $db_key WP options table key storing data
Method
logKeyedData public
Appends new data inside CommLog with unique key
This is the function to use when logging a new entry.
Param
string $key Key in CommData where data is stored
Param
mixed $sub_key Secondary key for new data
Param
mixed $data Data to be stored
Param
integer $max_entries Limits the number of logged entries
If the given key has more than the max entries, the earliest entry(ies) are deleted.
Method
append protected
Appends an entry to the indexed array in a given key

Param
string $key Comm Data key storing the data
Param
mixed $entry Value to be appended as array element
Param
mixed $nested_key (Optional) Key to set associative array instead of indexed
Method
unsetKey public
Removes existing data in key (


does not


initializes empty array)
Param
string $key Comm Data key storing the data
Method
limitEntries protected
Limits the number of elements stored in the given key
Param
string $key Comm Data key storing the data
Param
integer $max_entries Limit of entries to store
Method
set public
Replaces existing value with a new value
Param
string $key
Param
mixed $entry New value to be stored in key
Method
storeCommData public
Stores CommData array in WP options table under given key Other methods update the comm_data property but do not update the options table to limit the number of db methods called. This method updates the WP option to store multiple updates with a single request
Param
string $db_key WP options table key storing data
Method
get public
Returns keyed value from CommDataLog; null if key doesn't exist
Param
string $key
Return
mixed|null
Class

LB3Tools_Primary_Listener

Listens to the URL to extract commands

Author
stuartlb3

Method
__construct public
Method
listener public
Listens for GET requests with specific commands
Calls specific functions based on the request made; uses a switch/case so that only vetted functions are called Webhook listeners automatically call a static method when the key-value pair is found
Method
addGETKeys protected
Add the GET keys to monitor
Only querystring keys on this list will be heard
Method
addGETListeners protected
Listen for the GET querystring keys
Method
addAdvancedCommandWebhooks protected
Constructs and adds webhook listeners from advanced commands
Prefix array is built by filter; method iterates prefix array, checking if any of those prefixes are set as an advanced command. If set, the prefix, key, value, and class of that element is added to the listener array for listening
example: Filter added in class: "mailchimp_" => {mailchimp class inserted here}
Advanced command (this will listen for listener-code=secret-code and call the Mailchimp class' 'process' function mailchimp_listener-code=secret-code
Method
addWebhookListeners public
Iterates listener array for specified GET keys Webhooks added using webhook_listener_array filter and must specify a key, value, and class. If the key-value appears in the querystring, the class' static function process($listener,$response){} is called
Method
setPageSlug protected
Builds the page slug for a given page
Method
runPageCommand protected
Calls methods based on page URI
Param
string $page_url
Method
__get public
Returns value of a GET query string key, null if not set
Param
string $property
Return
string|boolean
Class

LB3Tools_Primary_Settings

Method
__construct public
Create plugin setting group and optional settings
Param
array $injector Master plugin dependency injector
Param
array $configured_settings Array of plugin settings
Method
pluginSettingsGroups public
Adds plugin Settings Group
Param
array $groups
Return
array
Method
pluginSettings public
Adds the configured settings to the master plugin's settings group
Param
array $master_settings Incoming settings from Ninja Forms
Return
array
Method
appendAddedSettings protected
Cycles through added settings and adds to configured settings in order
Method
addSettings public
Add pre-configured settings to settings section If existing index value exists, look for next open index position and use that.
Param
array $array Array of configured setting(s) for NF Settings section
Param
integer $index Position order for given settings
Method
__get public
Returns a Ninja Form plugin setting; returns null if not set
Param
string $nf_setting
Class

LB3Tools_RequiredFunctions

Loads alternative versions of required functions if PHP version does not support it

Author
stuartlb3

Method
__construct public
Method
loadFx protected
Given function name, loads alternative version if not in PHP version
Param
string $function_name
Class

LB3Tools_RequiredFunctions

Method
array_column /** * Returns the values from a single column of the input array, identified by * the $columnKey. * * Optionally, you may provide an $indexKey to index the values in the returned * array by the values from the $indexKey column in the input array. * * @param array $input A multi-dimensional array (record set) from which to pull * a column of values. * @param mixed $columnKey The column of values to return. This value may be the * integer key of the column you wish to retrieve, or it * may be the string key name for an associative array. * @param mixed $indexKey (Optional.) The column to use as the index/keys for * the returned array. This value may be the integer key * of the column, or it may be the string key name. * @return array */
Class

AjaxHandler

Enqueues AJAX handler, returns values, sends back values after processing

Author
stuartlb3

Method
__construct public
Constructs AJAX Handler with version for enqueuing
Param
type $version
Method
setAndActivate public
Set parameters, build and enqueue the jQuery script
Param
array $localized_params Array of paramters to pass to AJAX
Param
string $handle Enqueuing handle; use dashes in name. Handle is used as the filename.js. Handle with dashes replaced with underscores is used in add_action wp_ajax_handle_with_underscores
Param
string $file
Method
activateScript public
Build and enqueue the jQuery script
Method
enqueueMe protected
Enqueue and localize the jQuery script
Method
setLocalizeParameters protected
Method
setHandle protected
Method
setFile protected
Method
getJSURL protected
Class

Autoload

Autoloader loads namespaced classes in lib, Classes, and Feature directories

Author
stuartlb3

Method
__construct public
Construct the autoloader with namespace for Master class
Param
string $namespace Master class namespace, under which Features and Classes are filed
Param
string $dir File directory of Master class
Method
autoloader public
Autoloads namespaced classes in the Classes, Feature, and lib directories
Param
string $class
Return
null
Class

DatabaseStorageManager

Store and retrieve CRM data in the database

Author
stuartlb3

Method
__construct public
Configures the storage parameters for a given request
Sets the option key where the data will be stored in the options table of the Wordpress database
Param
string $request Key for DataStorageConfiguration
Param
array $dsm_config Data storage configuration
Method
storeData public
Stores the data in the options table by the configured key
Param
mixed $data Given data to store
Method
retrieveData public
Returns the data for the given request Optionally can validate raw data from the db
Return
array
Method
getValidatedData protected
Retrieves stored data and validates per default
Method
ensureDefaultData protected
Ensures default values are set
Param
array $raw_data
Return
array
Class

ConstructRequests

Constructs the Requests using the FieldMapArray and OptionRepeater objects Calls a validation class to validate form fields based on the special instructions

Author
stuartlb3

Method
__construct public
Constructs the Requests using the FieldMapArray and OptionRepeater objects Iterates the field map array object, validating individual fields, then adding the entry into the request object.
Param
\FieldMapProcessor\FieldMapArray $field_map_array
Param
type $option_repeater \FieldMapProcessor\Abstracts\OptionRepeaterAbstract
Param
type $requests \FieldMapProcessor\Requests
Method
iterateFieldArray protected
Validates field and adds it to Request Also ensures value is not empty string to avoid overwriting values when form does not have an update.
Method
validateFormValue protected
Validates the form field value by a specified special instruction
Param
mixed $incoming_value Incoming form field value
Param
string $special_instruction Option repeater special instruction
Return
mixed
Class

FieldMapArray

Constructs the Field Map Array from the submitted action The Field Map Array is a construction of the form submission values with a programmatic field map value to the CRM along with any additional instructions

Author
stuartlb3

Method
__construct public
Given the submitted option repeater values for the action, create Field Map Array
Param
array $keyed_action_settings Option repeater submission values for the action
Param
\Lb3CustomNamespace\Process\OptionRepeater $option_repeater
Method
extractFieldMapArray protected
Method
fieldMapArray public
Returns the constructed field map array
Return
array
Class

FieldMapProcessor

Given Action Settings, extracts field maps into standard array for processing

Author
stuartlb3

Static Method
fieldMapArray /** * Returns a Field Map Array Object * * @param array $keyed_action_settings * @param \LB3Tools\Abstracts\OptionRepeater $option_repeater * @return FieldMapArray */
Returns a Field Map Array Object
Param
array $keyed_action_settings
Param
\LB3Tools\Abstracts\OptionRepeater $option_repeater
Return
FieldMapArray
Static Method
requestsObject /** * Returns the Requests Object * * This object contains various arrays of requests * @param array Lookup array that links child objects to their parents * @return Requests */
Returns the Requests Object
This object contains various arrays of requests
Param
array Lookup array that links child objects to their parents
Return
Requests
Static Method
constructRequests /** * Constructs the Requests using the FieldMapArray and OptionRepeater objects * * @param FieldMapArray $field_map_array * @param \LB3Tools\Abstracts\OptionRepeaterAbstract $option_repeater * @param Requests $requests * @param object Validation object * @return ConstructRequests */
Constructs the Requests using the FieldMapArray and OptionRepeater objects
Param
FieldMapArray $field_map_array
Param
\LB3Tools\Abstracts\OptionRepeaterAbstract $option_repeater
Param
Requests $requests
Param
object Validation object
Return
ConstructRequests
Class

FieldValidation

Static methods that return validated values

Author
stuartlb3

Static Method
validate public
Static Method
validateDateFormat public
Static Method
forceBoolean public
Method
keepCharacters public
Remove any html tags but keep the special characters like apostrophe and ampersand
TODO: determine how to handle this unused method
Static Method
validateDateInterval public
Static Method
validateFileUpload public
Static Method
formatCurrency public
Static Method
semiColonDelimiter public
Static Method
replaceUnderscoreWithSpace public
Class

ReplacePlaceholders

Searches email and success messages to replace placeholders with results

Author
stuartlb3

Method
__construct public
Method
iterateReplaceableActions protected
Iterates each action configured to have replaceable text Calls method to iterate and replace each placeholder within the action
Method
iteratePlaceholders protected
Iterates each replace_me in a given action with the specified replacement Replacement value is an indexed array and gets imploded by the action key's configured delimiter
Param
string $action_key Key of the action in which to replace the replace_me text with the specified keyed value in the action_result
Param
string $delimiter Delimiter to separate array elements when replacing the text
Method
actionSettings public
Return the action settings
Return
array
Class

Requests

Holds a structured array of individual requests Accepts an array of parent-child links with which it can link child arrays with their parents. Holds an array of Record IDs used both for linking objects and updating existing records

Author
stuartlb3

Method
__construct public

Param
array $parent_child_links Lookup array that links child objects to their parents
Method
addFieldMap public
Adds a field map to the structured array and Duplicate Check if requested
Param
array $instructions
Param
mixed $form_value
Method
addNewId public
Adds a new ID to the new ID array
Param
string $object_name
Param
integer $index
Param
string $id
Method
linkParents public
Given an object and index, looks for newly created parents to link Links to parents if they were created as earlier request. Matches on index in a one-to-one structure or, if no matching index, links to index = 0 in a one-to-many. ex. - Two accounts and two contacts are matched one-to-one (each contact matches to one account each while one account with two contacts are matched one-to-many (both contacts are linked to the single account)
Param
string $object_name
Method
setRequestTypes public
After initial construction, set request types for all object requests If the request_array has a field 'record_id', then the request type is 'update' and that record_id identifies the record to update. Default is 'insert'
Method
iterateChildren protected
Links a given indexed child object with parents
Param
string $object_name
Param
array $parents
Param
integer $index
Method
addToStructuredArray protected
Adds a field map to the structured array
Param
array $instructions Keys: 'object' 'index' 'field_name
Param
mixed $form_value
Method
addToDuplicateCheckArray protected
Adds a field map to the duplicate check array
Param
array $instructions Keys: 'object' 'index' 'field_name
Param
mixed $form_value
Method
structuredArray public
Returns entire structured array or single objects portion, false if not set
Param
string $object_name
Return
Mixed
Method
duplicateCheckArray public
Method
newlyCreatedIds public
Method
requestType public
Class

FieldValidationAbstract

Static Method
validate public
Static Method
validateDateFormat public
Static Method
forceBoolean public
Static Method
validateDateInterval public
Static Method
semiColonDelimiter public
Static Method
replaceUnderscoreWithSpace public
Class

OptionRepeaterAbstract

Method
fieldMapDropdown public
Returns the Field Map Dropdown
Return
array
See
Lb3CustomNamespace\Process\OptionRepeater\$field_map_dropdown
Method
fieldsToExtract public
Returns the FieldsToExtract
Return
array
Method
specialInstructions public
Returns the Special Instructions
Return
array
Method
lookupValue public
Method
fieldMapInstructions public
Class

PageAjaxAbstract

Abstract setup for page AJAX setup Simplifies the page-specific class to managing variables being passed and handling the data back and forth

Author
stuartlb3

Method
__construct public
Method
addAjax public
Method
enqueueMe public
Method
addListener public
Method
searchFieldListener public
Method
handleResponse protected
Handles the POST from the js
Assembles the POST_PARAMS into an array; calls the method spec'd in the 'command' keyed value; returns the DATA_ECHO
Class

PageDom

Methods to build a Page DOM

Author
stuartlb3

Method
__construct public
Method
addElement public
Adds Element to any given node or main DOMDoc
Param
string $type
Param
string $class
Param
string $id
Param
\DOMElement $parent
Param
string $text
Param
string $style
Return
\DOMElement
Method
addRow public
Adds a single row with cells given in array
Param
\DOMNode $table_node
Param
array $cell_values Cell td values
Param
array $cell_classes td classes
Param
string $row_class tr class
Param
boolean $is_heading
Return
type
Method
addCell public
Add a single cell to a given row node
Param
\DOMElement $row_node
Param
string $cell_value
Param
string $cell_class
Param
boolean $is_heading
Method
addKeyValueRows public
Given key-value pair array, builds rows with key cell and value cell
Param
array $key_value_array Array of key-values, each a row in the table
Param
\DOMElement $parent Node to which the rows are appended
Param
string $row_class Class name for each row
Param
array $row_id Row IDs, given as array with same count as key-values
Param
string $key_class Class for the key cells
Param
string $value_class Class for the value cells
Method
constructRowColumns protected
Param
array $cell_array Index array of crm_value, label arrays
Param
integer $columns Number of columns in row
Param
\DOMElement $parent Node to which to add cells
Param
string $selected String for checking if value is selected
Method
addSelectedClass protected
Adds the 'selected' class if the given node is selected If the given node has a value that matches one of the given values, add the 'selected' class to the node. Incoming values can be a string or a semi-colon delineated array.
Param
\DOMElement $node Node containing a value
Param
string $node_content Value displayed in the node
Param
string $value Selections from the CRM to check against
Method
addClassIdStyle public
Method
addAttribute public
Add an attribute to a given node
If attribute value is empty, does nothing. This prevents having to check for value at every call.
Param
string $attr_type
Param
string $value
Param
\DOMElement $node
Method
getHTML public
Returns generated HTML string
Return
string
Method
getDOM public
Returns the complete DOMDocument
Return
\DOMDocument
Class

ProcessActionAbstract

Method
__construct public
Processes the Add to Salesforce Action upon submission
Param
array $action_settings Action Settings from form submission
Param
string $form_id Form ID of the submission
Param
array $data Data array of the form submission
Method
processAction public
Method
getData public
Returns the $data from the form submission May alter the data as needed for downstream actions
Return
array
Method
getMessages public
Class

ZohoCampaignAPI_ResponseAnalysis

Description of ResponseAnalysis

Author
stuartlb3

Method
__construct public
Method
analyzeSubscribeSubscriber public
Builds response array for subscribeSubscriber API request
Return
null
Method
analyzeGetSubscriberFields public
Builds response array for GetSubscriberFields API request
Return
null
Method
validateSubscriberFieldsStructure protected
Extracts and returns Subscriber Fields in configured expected array structure
Param
array $json_array
Return
array
Method
analyzeGetMailingLists public
Builds response array for GetSubscriberFields request
Return
null
Method
validateMailingListsStructure protected
Extracts and returns Mailing Lists in configured expected array structure
Param
array $json_array
Return
array
Method
initAndPerformErrorChecks protected
Reset Response Array and perform WP / API error checks
Param
string $context To what this response refers
Return
boolean Errors found or not
Method
zohoErrorCodeCheck protected
Checks for rejection error code from Zoho
Return
boolean True if Zoho rejection, false if not Zoho rejection
Method
wpErrorCheck protected
Sets wp_error and response code/body if not a WP Error Detailed analysis can be done downstream
Param
array|WP_Error $raw_response wp_remote_post complete response
Return
bool False if not WP Error, true if WP Error
Method
timeStamp protected
Stamps date/time
Method
resetResponseArrayDefaults protected
Resets Response Array to default values
Method
addTroubleshootingGuidance protected
Adds troubleshooting guidance keyed off message_support
Method
getResponse public
Returns Response Array after adding available troubleshooting guidance
Return
array
Class

ZohoCampaignAPI_ZohoCampaignAPI

Handles communication with Zoho Campaigns via Zoho's API

Author
stuartlb3

Method
__construct public
Method
setURLValues protected
Set endpoints, query parameters, and communication arguments
Method
build protected
Build a full API request URL
Param
string $endpoint_key
Param
array $querystring_array Array of querystring parameter KEYS
Return
string
Method
getSubscriberFields public
Makes API request to get Subscriber Fields
See
ZohoCampaignAPI/Config/SubscriberExpectedStructure
Return
array ZohoCampaignAPIResponseArray
Method
getMailingLists public
Makes API request to get Mailing Lists
See
ZohoCampaignAPI/Config/MailingListsExpectedStructure
Return
array ZohoCampaignAPIResponseArray
Method
subscribeSubscriber public
Subscribes a new email to a given list
Param
string $list_key Key of the mailing list subscribing to
Param
string $json_request JSON request
Return
array Response Array
See
ZohoCampaignAPI/Config/ZohoCampaignAPIResponseArray.php
Class

NFZohoCampaign

Static Method
instance public
Method
__construct public
Method
setupLicense public
Set up the licensing
Method
setupAdmin public
Create the settings page
Method
registerMergeTags
Method
setEnqueueVersion protected
Sets the mode as DEV (for development) or REL (in release)s
Method
instantiateConstants protected
Instantiate constants
Requires include because instantiation occurs before other classes
Method
loadTools public
Loads standard tools
Retrieves injector each instantiation for dependencies of later classes inside this method
Method
loadPrimaryClasses public
Loads primary classes available through NFZohoCampaign()->
Method
loadLibraries protected
Method
loadFeatures protected
Static Method
config public
Static Method
template public
Method
autoloader public
Automatically includes files for classes with known filename structures
Param
string $class_name
Return
null
Method
getInjector public
Assembles array of injector values and returns them
Some injector values may not be available depending on when called by dependent so watch for timing to ensure depending isn't called before value is ready
Only adds values that are set; thus if a value is requested of the injector before it is set, the error appears in the requesting location, not here. This helps debug timing.
Return
array
Method
NFZohoCampaign /** * The main function responsible for returning NFZohoCampaign * Instance to functions everywhere. * * @since 3.0 * @return NFZohoCampaign Highlander Instance */