Object Sync for Salesforce Code Documentation

Object_Sync_Sf_Pull_Options

Object_Sync_Sf_Pull_Options class.

Table of Contents

$direction  : string
Direction of the operation
$option_prefix  : string
The plugin's prefix when saving options to the database
$version  : string
Current version of the plugin
$upgradeable_keys  : string
Option keys that can be upgraded
__construct()  : mixed
Constructor for option records class
delete()  : bool
Delete the individual option records for sync operation
get()  : mixed
Get individual option records for sync operations
legacy_delete()  : bool
Delete the legacy individual option records for sync operation
legacy_get()  : mixed
Get legacy named individual option records for sync operations
set()  : bool
Set individual option records for sync operations
add_upgradeable_key()  : array<string|int, mixed>
Add an option key to the array of upgradeable keys.
generate_option_key()  : string
Generate an option key
get_upgradeable_keys()  : array<string|int, mixed>
Get the array of upgradeable keys.
legacy_option_upgrade()  : bool
Set individual option records for sync operations
remove_upgradeable_key()  : array<string|int, mixed>
Remove an option key from the array of upgradeable keys.

Properties

$upgradeable_keys

Option keys that can be upgraded

private string $upgradeable_keys
Tags
deprecated

this was added in 2.1.0 to upgrade old option keys, but will be removed in a future version.

Methods

delete()

Delete the individual option records for sync operation

public delete(string $operation[, string $object_type = '' ][, int $fieldmap_id = '' ]) : bool
Parameters
$operation : string

what is the option related to? last pull, current pull, merge, delete, etc.

$object_type : string = ''

the Salesforce object type.

$fieldmap_id : int = ''

the ID of the specific fieldmap that is running.

Return values
bool

$result True if successful, false otherwise.

get()

Get individual option records for sync operations

public get(string $operation[, string $object_type = '' ][, int $fieldmap_id = '' ][, mixed $default = false ]) : mixed
Parameters
$operation : string

what is the option related to? last pull, current pull, merge, delete, etc.

$object_type : string = ''

the Salesforce object type.

$fieldmap_id : int = ''

the ID of the specific fieldmap that is running.

$default : mixed = false

the default value for the option.

Return values
mixed

$value the value of the item. False if it's empty.

legacy_delete()

Delete the legacy individual option records for sync operation

public legacy_delete(string $key) : bool
Parameters
$key : string

the legacy key to delete.

Tags
deprecated

this was added in 2.1.0 to upgrade old option keys, but will be removed in a future version.

Return values
bool

$result True if successful, false otherwise.

legacy_get()

Get legacy named individual option records for sync operations

public legacy_get(string $operation[, string $object_type = '' ], int $fieldmap_id[, mixed $default = false ]) : mixed
Parameters
$operation : string

what is the option related to? last pull, current pull, merge, delete, etc.

$object_type : string = ''

the Salesforce object type.

$fieldmap_id : int

the ID of the specific fieldmap that is running.

$default : mixed = false

the default value for the option.

Tags
deprecated

this was added in 2.1.0 to upgrade old option keys, but will be removed in a future version.

Return values
mixed

$value the value of the item. False if it's empty.

set()

Set individual option records for sync operations

public set(string $operation[, string $object_type = '' ][, int $fieldmap_id = '' ][, mixed $value = '' ][, bool $autoload = false ]) : bool
Parameters
$operation : string

what is the option related to? last pull, current pull, merge, delete, etc.

$object_type : string = ''

the Salesforce object type.

$fieldmap_id : int = ''

the ID of the specific fieldmap that is running.

$value : mixed = ''

the value to be saved in the option.

$autoload : bool = false

whether to autoload the option value. Default to false to avoid the cache.

Return values
bool

$result value of the save operation.

add_upgradeable_key()

Add an option key to the array of upgradeable keys.

private add_upgradeable_key(string $key) : array<string|int, mixed>
Parameters
$key : string

the key to add to the array.

Tags
deprecated

this was added in 2.1.0 to upgrade old option keys, but will be removed in a future version.

Return values
array<string|int, mixed>

$this->upgradeable_keys the array of keys.

generate_option_key()

Generate an option key

private generate_option_key(array<string|int, mixed> $params[, bool $legacy = false ]) : string
Parameters
$params : array<string|int, mixed>

the pieces to put together.

$legacy : bool = false

whether this is a legacy key. This is for deprecated keys and will be removed in a future version.

Return values
string

$key the full option key.

get_upgradeable_keys()

Get the array of upgradeable keys.

private get_upgradeable_keys() : array<string|int, mixed>
Tags
deprecated

this was added in 2.1.0 to upgrade old option keys, but will be removed in a future version.

Return values
array<string|int, mixed>

$this->upgradeable_keys the array of keys.

legacy_option_upgrade()

Set individual option records for sync operations

private legacy_option_upgrade(string $operation[, string $object_type = '' ][, int $fieldmap_id = '' ][, mixed $value = '' ][, bool $autoload = true ]) : bool
Parameters
$operation : string

what is the option related to? last pull, current pull, merge, delete, etc.

$object_type : string = ''

the Salesforce object type.

$fieldmap_id : int = ''

the ID of the specific fieldmap that is running.

$value : mixed = ''

the value to be saved in the option.

$autoload : bool = true

whether to autoload the option value.

Tags
deprecated

this was added in 2.1.0 to upgrade old option keys, but will be removed in a future version.

Return values
bool

$result value of the save operation.

remove_upgradeable_key()

Remove an option key from the array of upgradeable keys.

private remove_upgradeable_key(string $key) : array<string|int, mixed>
Parameters
$key : string

the key to remove from the array.

Tags
deprecated

this was added in 2.1.0 to upgrade old option keys, but will be removed in a future version.

Return values
array<string|int, mixed>

$this->upgradeable_keys the array of keys.

Search results