Menu

## Object_Sync_Salesforce
in package

class-object-sync-salesforce.php : 14

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

#### $action_group_suffix

class-object-sync-salesforce.php : 56

Suffix for group name in ActionScheduler

`public string $action_group_suffix`

#### $file

class-object-sync-salesforce.php : 28

The main plugin file

`public string $file`

#### $instance

class-object-sync-salesforce.php : 71

Legacy property that holds an instance of the plugin class.

`public static object $instance`

##### Tags

deprecated

  since 2.0.0

#### $logging

class-object-sync-salesforce.php : 106

Object_Sync_Sf_Logging class

`public object $logging`

#### $login_credentials

class-object-sync-salesforce.php : 99

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

`public array<string|int, mixed> $login_credentials`

#### $mappings

class-object-sync-salesforce.php : 113

Object_Sync_Sf_Mapping class

`public object $mappings`

#### $option_prefix

class-object-sync-salesforce.php : 49

The plugin's prefix when saving options to the database

`public string $option_prefix`

#### $pull

class-object-sync-salesforce.php : 142

Object_Sync_Sf_Salesforce_Pull class

`public object $pull`

#### $push

class-object-sync-salesforce.php : 135

Object_Sync_Sf_Salesforce_Push class

`public object $push`

#### $queue

class-object-sync-salesforce.php : 78

Object_Sync_Sf_Queue class

`public object $queue`

#### $salesforce

class-object-sync-salesforce.php : 128

Object_Sync_Sf_Salesforce class This contains Salesforce API methods

`public array<string|int, mixed> $salesforce`

#### $schedulable_classes

class-object-sync-salesforce.php : 63

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

`public array<string|int, mixed> $schedulable_classes`

#### $slug

class-object-sync-salesforce.php : 42

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

`public string $slug`

#### $version

class-object-sync-salesforce.php : 21

Current version of the plugin

`public string $version`

#### $wordpress

class-object-sync-salesforce.php : 120

Object_Sync_Sf_WordPress class

`public object $wordpress`

#### $wpdb

class-object-sync-salesforce.php : 35

Global object of `$wpdb`, the WordPress database

`public object $wpdb`

#### $activated

class-object-sync-salesforce.php : 85

Object_Sync_Sf_Activate class

`private object $activated`

#### $composer_loaded

class-object-sync-salesforce.php : 92

Tells us if composer has been autoloaded

`private bool $composer_loaded`

#### $rest

class-object-sync-salesforce.php : 149

Object_Sync_Sf_Rest class

`private object $rest`

### Methods

#### __construct()

class-object-sync-salesforce.php : 158

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()

class-object-sync-salesforce.php : 217

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()

class-object-sync-salesforce.php : 311

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()

class-object-sync-salesforce.php : 236

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 —

#### run()

class-object-sync-salesforce.php : 261

Run the plugin, independent of activation methods.

`public run() : mixed`

##### Return values

mixed —

#### salesforce_get_api()

class-object-sync-salesforce.php : 405

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> —

#### textdomain()

class-object-sync-salesforce.php : 432

Load textdomain

`public textdomain() : mixed`

##### Return values

mixed —

#### add_actions()

class-object-sync-salesforce.php : 252

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()

class-object-sync-salesforce.php : 352

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.

#### composer_loaded()

class-object-sync-salesforce.php : 299

Autoload things from Composer.

`private composer_loaded() : bool`

##### Return values

bool —

true

#### get_login_credentials()

class-object-sync-salesforce.php : 377

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()

class-object-sync-salesforce.php : 441

Check the server to see if Soap is available

`private is_soap_available() : bool`

##### Return values

bool —

$is_soap_available

#### is_soap_loaded()

class-object-sync-salesforce.php : 454

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