Properties

$schedulable_classes

$schedulable_classes : array

Type

array — Array of what classes in the plugin can be scheduled to occur with `wp_cron` events

$mappings

$mappings : object

Type

object — Load and initialize the Object_Sync_Sf_Mapping class

$salesforce

$salesforce : object

Type

object — Load and initialize the Object_Sync_Sf_Salesforce class. This contains the Salesforce API methods

$instance

$instance : object

Type

object — Static property to hold an instance of the class; this seems to make it reusable

$wpdb

$wpdb : object

Type

object — Global object of `$wpdb`, the WordPress database

$slug

$slug : string

Type

string — The plugin's slug so we can include it when necessary

$option_prefix

$option_prefix : string

Type

string — The plugin's option prefix

$login_credentials

$login_credentials : array

Type

array — Login credentials for the Salesforce API; comes from wp-config or from the plugin settings

$version

$version : string

Type

string — Current version of the plugin

$queue

$queue : object

Type

object

$activated

$activated : object

Type

object

$logging

$logging : object

Type

object — Load and initialize the Object_Sync_Sf_Logging class

$wordpress

$wordpress : object

Type

object — Load and initialize the Object_Sync_Sf_WordPress class

$push

$push : object

Type

object — Load and initialize the Object_Sync_Sf_Salesforce_Push class

$pull

$pull : object

Type

object — Load and initialize the Object_Sync_Sf_Salesforce_Pull class

Methods

get_instance()

get_instance() : object

Load the static $instance property that holds the instance of the class.

This instance makes the class reusable by other plugins

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

object —

The sfapi object if it is authenticated (empty, otherwise)

salesforce_get_api()

salesforce_get_api() : array

Public helper to load the Salesforce API and see if it is authenticated.

This is public so other plugins can access the same SF API instance

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

array —

Whether Salesforce is authenticated (boolean) The sfapi object if it is authenticated (empty, otherwise)

plugin_action_links()

plugin_action_links(array  $links, string  $file) : array

Display a Settings link on the main Plugins page

Parameters

array $links
string $file
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

array —

$links These are the links that go with this plugin's entry

admin_scripts_and_styles()

admin_scripts_and_styles() : void

Admin styles. Load the CSS and JavaScript for the plugin's settings

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

textdomain()

textdomain() : void

Load textdomain

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

__construct()

__construct() : void

Constructor that sets up the parameters to pass to all the other classes, and the methods that call the other classes

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

load()

load(object  $wpdb, string  $version, string  $slug, string  $option_prefix) 

Load immediately required things

Parameters

object $wpdb
string $version
string $slug
string $option_prefix
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

queue()

queue(object  $wpdb, string  $version, string  $slug, string  $option_prefix, array  $schedulable_classes) : \Object_Sync_Sf_Queue

Get queue instance.

Parameters

object $wpdb
string $version
string $slug
string $option_prefix
array $schedulable_classes
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

\Object_Sync_Sf_Queue

logging()

logging(object  $wpdb, string  $version, string  $slug, string  $option_prefix) : object

Log events

Parameters

object $wpdb
string $version
string $slug
string $option_prefix
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

object —

Instance of Object_Sync_Sf_Logging

mappings()

mappings(object  $wpdb, string  $version, string  $slug, string  $option_prefix, object  $logging) : object

Map the Salesforce and WordPress objects and fields to each other

Parameters

object $wpdb
string $version
string $slug
string $option_prefix
object $logging
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

object —

Instance of Object_Sync_Sf_Mapping

wordpress()

wordpress(object  $wpdb, string  $version, string  $slug, string  $option_prefix, object  $mappings, object  $logging) : object

Private helper to load methods for manipulating core WordPress data across the plugin

Parameters

object $wpdb
string $version
string $slug
string $option_prefix
object $mappings
object $logging
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

object —

Instance of Object_Sync_Sf_WordPress

activate()

activate(object  $wpdb, string  $version, string  $slug, string  $option_prefix, array  $schedulable_classes, object  $queue) : object

What to do upon activation of the plugin

Parameters

object $wpdb
string $version
string $slug
string $option_prefix
array $schedulable_classes
object $queue
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

object —

Instance of Object_Sync_Sf_Activate

deactivate()

deactivate(object  $wpdb, string  $version, string  $slug, string  $option_prefix, array  $schedulable_classes, object  $queue) : object

What to do upon deactivation of the plugin

Parameters

object $wpdb
string $version
string $slug
string $option_prefix
array $schedulable_classes
object $queue
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

object —

Instance of Object_Sync_Sf_Deactivate

push()

push(object  $wpdb, string  $version, array  $login_credentials, string  $slug,   $option_prefix, object  $wordpress, object  $salesforce, object  $mappings, object  $logging, array  $schedulable_classes,   $queue) : object

Methods to push data from WordPress to Salesforce

Parameters

object $wpdb
string $version
array $login_credentials
string $slug
$option_prefix
object $wordpress
object $salesforce
object $mappings
object $logging
array $schedulable_classes
$queue
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

object —

Instance of Object_Sync_Sf_Salesforce_Push

pull()

pull(object  $wpdb, string  $version, array  $login_credentials, string  $slug, string  $option_prefix, object  $wordpress, object  $salesforce, object  $mappings, object  $logging, array  $schedulable_classes,   $queue) : object

Methods to pull data from Salesforce to WordPress

Parameters

object $wpdb
string $version
array $login_credentials
string $slug
string $option_prefix
object $wordpress
object $salesforce
object $mappings
object $logging
array $schedulable_classes
$queue
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

object —

Instance of Object_Sync_Sf_Salesforce_Pull

rest()

rest(object  $wpdb, string  $version, string  $slug, string  $option_prefix, object  $wordpress, object  $salesforce, object  $mappings, object  $push, object  $pull) : object

Load the rest class.

This handles REST API methods

Parameters

object $wpdb
string $version
string $slug
string $option_prefix
object $wordpress
object $salesforce
object $mappings
object $push
object $pull
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

object —

$admin Instance of Object_Sync_Sf_Rest

load_admin()

load_admin(object  $wpdb, string  $version, array  $login_credentials, string  $slug, string  $option_prefix, object  $wordpress, object  $salesforce, object  $mappings, object  $push, object  $pull, object  $logging, array  $schedulable_classes, object  $queue) : object

Load the admin class.

This also creates admin menu, unless the plugin that calls this library has indicated that it has its own menu

Parameters

object $wpdb
string $version
array $login_credentials
string $slug
string $option_prefix
object $wordpress
object $salesforce
object $mappings
object $push
object $pull
object $logging
array $schedulable_classes
object $queue
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

object —

$admin Instance of Object_Sync_Sf_Admin

get_login_credentials()

get_login_credentials() : array

Get the pre-login Salesforce credentials.

These depend on the plugin's settings or constants defined in wp-config.php.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

array —

$login_credentials Includes all settings necessary to log into the Salesforce API. Replaces settings options with wp-config.php values if they exist.