Object Sync for Salesforce Code Documentation

Object_Sync_Salesforce
in package

Object_Sync_Salesforce class.

Table of Contents

$action_group_suffix  : string
Suffix for group name in ActionScheduler
$file  : string
The main plugin file
$instance  : object
Legacy property that holds an instance of the plugin class.
$logging  : object
Object_Sync_Sf_Logging class
$login_credentials  : array<string|int, mixed>
Login credentials for the Salesforce API; comes from wp-config or from the plugin settings
$mappings  : object
Object_Sync_Sf_Mapping class
$option_prefix  : string
The plugin's prefix when saving options to the database
$pull  : object
Object_Sync_Sf_Salesforce_Pull class
$push  : object
Object_Sync_Sf_Salesforce_Push class
$queue  : object
Object_Sync_Sf_Queue class
$salesforce  : array<string|int, mixed>
Object_Sync_Sf_Salesforce class This contains Salesforce API methods
$schedulable_classes  : array<string|int, mixed>
Array of what classes in the plugin can be scheduled to occur with `wp_cron` events
$slug  : string
The plugin's slug so we can include it when necessary
$version  : string
Current version of the plugin
$wordpress  : object
Object_Sync_Sf_WordPress class
$wpdb  : object
Global object of `$wpdb`, the WordPress database
$activated  : object
Object_Sync_Sf_Activate class
$composer_loaded  : bool
Tells us if composer has been autoloaded
$rest  : object
Object_Sync_Sf_Rest class
__construct()  : void
This is our constructor
get_instance()  : object
Load the static $instance property that holds the instance of the class.
get_salesforce_api_version()  : array<string|int, mixed>
Set the Salesforce API version.
init()  : mixed
Initialize the plugin and start the action hooks.
run()  : mixed
Run the plugin, independent of activation methods.
salesforce_get_api()  : array<string|int, mixed>
Public helper to load the Salesforce API and see if it is authenticated.
textdomain()  : mixed
Load textdomain
add_actions()  : mixed
Run non-activation actions.
check_deprecated_salesforce_api_version()  : string
Check deprecated methods for a Salesforce API version.
composer_loaded()  : bool
Autoload things from Composer.
get_login_credentials()  : array<string|int, mixed>
Get the pre-login Salesforce credentials.
is_soap_available()  : bool
Check the server to see if Soap is available
is_soap_loaded()  : bool
Check the plugin to see if the Soap option has been enabled and the class has been loaded

Properties

$instance

Legacy property that holds an instance of the plugin class.

public static object $instance
Tags
deprecated

since 2.0.0

$login_credentials

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

public array<string|int, mixed> $login_credentials

$salesforce

Object_Sync_Sf_Salesforce class This contains Salesforce API methods

public array<string|int, mixed> $salesforce

$schedulable_classes

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

public array<string|int, mixed> $schedulable_classes

Methods

__construct()

This is our constructor

public __construct(string $version, string $file) : void
Parameters
$version : string

is the plugin version.

$file : string

is the main plugin file.

Return values
void

get_instance()

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

public static get_instance() : object

This is preserved for legacy usage, as the same thing exists in the object_sync_for_salesforce function.

Tags
deprecated

since 2.0.0

Return values
object

$plugin

get_salesforce_api_version()

Set the Salesforce API version.

public get_salesforce_api_version() : array<string|int, mixed>

As of version 2.2.0, this is set by the plugin and is not configurable in the interface, though it can be overridden by developer hook. Until version 3.0, this value will be overridden by pre-existing settings.

Return values
array<string|int, mixed>

$sf_api_version_data what we know about the API version that is in use.

init()

Initialize the plugin and start the action hooks.

public init() : mixed

We run this separately because activate can't run without the right priority.

Return values
mixed

salesforce_get_api()

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

public salesforce_get_api() : array<string|int, mixed>

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

Return values
array<string|int, mixed>

add_actions()

Run non-activation actions.

private add_actions() : mixed

We do this on -10 because ActionScheduler has to have access to plugins_loaded with priority of zero.

Return values
mixed

check_deprecated_salesforce_api_version()

Check deprecated methods for a Salesforce API version.

private check_deprecated_salesforce_api_version(string $sf_api_version) : string
Parameters
$sf_api_version : string

the active Salesforce version.

Tags
deprecated

and will be removed in version 3.0.

Return values
string

$deprecated_api_version the deprecated Salesforce version, if it exists.

get_login_credentials()

Get the pre-login Salesforce credentials.

private get_login_credentials() : array<string|int, mixed>

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

Return values
array<string|int, mixed>

$login_credentials

is_soap_available()

Check the server to see if Soap is available

private is_soap_available() : bool
Return values
bool

$is_soap_available

is_soap_loaded()

Check the plugin to see if the Soap option has been enabled and the class has been loaded

private is_soap_loaded() : bool
Return values
bool

$is_soap_loaded

Search results