Menu

## Object_Sync_Sf_Sync_Transients
in package

class-object-sync-sf-sync-transients.php : 14

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

#### $option_prefix

class-object-sync-sf-sync-transients.php : 28

The plugin's prefix when saving options to the database

`public string $option_prefix`

#### $version

class-object-sync-sf-sync-transients.php : 21

Current version of the plugin

`public string $version`

#### $upgradeable_keys

class-object-sync-sf-sync-transients.php : 36

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

#### __construct()

class-object-sync-sf-sync-transients.php : 41

Constructor for transient records class

`public __construct() : mixed`

##### Return values

mixed —

#### delete()

class-object-sync-sf-sync-transients.php : 217

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

class-object-sync-sf-sync-transients.php : 159

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

class-object-sync-sf-sync-transients.php : 236

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

class-object-sync-sf-sync-transients.php : 197

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

class-object-sync-sf-sync-transients.php : 89

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

class-object-sync-sf-sync-transients.php : 251

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

class-object-sync-sf-sync-transients.php : 55

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

class-object-sync-sf-sync-transients.php : 291

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

class-object-sync-sf-sync-transients.php : 130

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

class-object-sync-sf-sync-transients.php : 269

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