Menu

## Object_Sync_Sf_Pull_Options
in package

class-object-sync-sf-pull-options.php : 14

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

#### $direction

class-object-sync-sf-pull-options.php : 35

Direction of the operation

`public string $direction`

#### $option_prefix

class-object-sync-sf-pull-options.php : 28

The plugin's prefix when saving options to the database

`public string $option_prefix`

#### $version

class-object-sync-sf-pull-options.php : 21

Current version of the plugin

`public string $version`

#### $upgradeable_keys

class-object-sync-sf-pull-options.php : 43

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

#### __construct()

class-object-sync-sf-pull-options.php : 48

Constructor for option records class

`public __construct() : mixed`

##### Return values

mixed —

#### delete()

class-object-sync-sf-pull-options.php : 228

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

class-object-sync-sf-pull-options.php : 169

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

class-object-sync-sf-pull-options.php : 247

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

class-object-sync-sf-pull-options.php : 208

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

class-object-sync-sf-pull-options.php : 99

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

class-object-sync-sf-pull-options.php : 262

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

class-object-sync-sf-pull-options.php : 65

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

class-object-sync-sf-pull-options.php : 302

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

class-object-sync-sf-pull-options.php : 140

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

class-object-sync-sf-pull-options.php : 280

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