Object Sync for Salesforce Code Documentation

Object_Sync_Sf_Sync_Transients

Object_Sync_Sf_Sync_Transients class.

Table of Contents

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

Properties

$upgradeable_keys

Transient 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 transient records for sync operation

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

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

$object_type : string = ''

the WordPress or 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 transient 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 WordPress or Salesforce object type.

$fieldmap_id : int = ''

the ID of the specific fieldmap that is running.

$default : mixed = false

the default value for the transient.

Return values
mixed

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

legacy_delete()

Delete the legacy individual transient 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 transient keys, but will be removed in a future version.

Return values
bool

$result True if successful, false otherwise.

legacy_get()

Get legacy named individual transiuent records for sync operations

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

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

$object_type : string = ''

the WordPress or Salesforce object type.

$fieldmap_id : int

the ID of the specific fieldmap that is running.

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 transient records for sync operations

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

what is the transient 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.

$expiration : int

whether to expire the transient.

Return values
bool

$result value of the save operation.

add_upgradeable_key()

Add an transient 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 transient keys, but will be removed in a future version.

Return values
array<string|int, mixed>

$this->upgradeable_keys the array of keys.

generate_transient_key()

Generate a transient key

private generate_transient_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 transient 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 transient keys, but will be removed in a future version.

Return values
array<string|int, mixed>

$this->upgradeable_keys the array of keys.

legacy_transient_upgrade()

Set individual transient records for sync operations

private legacy_transient_upgrade(string $operation[, string $object_type = '' ][, int $fieldmap_id = '' ][, mixed $value = '' ], int $expiration) : 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.

$expiration : int

whether to expire the transient.

Tags
deprecated

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

Return values
bool

$result value of the save operation.

remove_upgradeable_key()

Remove a transient 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 transient keys, but will be removed in a future version.

Return values
array<string|int, mixed>

$this->upgradeable_keys the array of keys.

Search results