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
$action_group_suffix
Suffix for group name in ActionScheduler
public
string
$action_group_suffix
$file
The main plugin file
public
string
$file
$instance
Legacy property that holds an instance of the plugin class.
public
static object
$instance
Tags
$logging
Object_Sync_Sf_Logging class
public
object
$logging
$login_credentials
Login credentials for the Salesforce API; comes from wp-config or from the plugin settings
public
array<string|int, mixed>
$login_credentials
$mappings
Object_Sync_Sf_Mapping class
public
object
$mappings
$option_prefix
The plugin's prefix when saving options to the database
public
string
$option_prefix
$pull
Object_Sync_Sf_Salesforce_Pull class
public
object
$pull
$push
Object_Sync_Sf_Salesforce_Push class
public
object
$push
$queue
Object_Sync_Sf_Queue class
public
object
$queue
$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
$slug
The plugin's slug so we can include it when necessary
public
string
$slug
$version
Current version of the plugin
public
string
$version
$wordpress
Object_Sync_Sf_WordPress class
public
object
$wordpress
$wpdb
Global object of `$wpdb`, the WordPress database
public
object
$wpdb
$activated
Object_Sync_Sf_Activate class
private
object
$activated
$composer_loaded
Tells us if composer has been autoloaded
private
bool
$composer_loaded
$rest
Object_Sync_Sf_Rest class
private
object
$rest
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
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 —run()
Run the plugin, independent of activation methods.
public
run() : mixed
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> —textdomain()
Load textdomain
public
textdomain() : mixed
Return values
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
Return values
string —$deprecated_api_version the deprecated Salesforce version, if it exists.
composer_loaded()
Autoload things from Composer.
private
composer_loaded() : bool
Return values
bool —true
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