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