Property | Type | Description | |
---|---|---|---|
$cache | cache for settings | ||
$db | |||
$entities | |||
$table | Name of the database table |
Method | Description | |
---|---|---|
__construct ( |
Constructor | |
get ( integer $entity_guid, string $name ) : mixed | Gets a private setting for an entity | |
getAll ( integer $entity_guid ) : string[] | Return an array of all private settings. | |
getEntities ( array $options = [] ) : mixed | Returns entities based upon private settings | |
remove ( integer $entity_guid, string $name ) : boolean | Deletes a private setting for an entity. | |
removeAllForEntity ( integer $entity_guid ) : boolean | Deletes all private settings for an entity | |
set ( integer $entity_guid, string $name, string $value ) : boolean | Sets a private setting for an entity. |
Method | Description | |
---|---|---|
getWhereSql ( string $table, array | null $names = null, array | null $values = null, array | null $pairs = null, string $pair_operator = 'AND', string $name_prefix = '' ) : array | Returns private setting name and value SQL where/join clauses for entities |
public __construct ( |
||
$db | The database | |
$entities | Entities table | |
$cache | Settings cache |
public getEntities ( array $options = [] ) : mixed | ||
$options | array | Array in format: private_setting_names => null|ARR private setting names private_setting_values => null|ARR metadata values private_setting_name_value_pairs => null|ARR ( name => 'name', value => 'value', 'operand' => '=', ) Currently if multiple values are sent via an array (value => array('value1', 'value2') the pair's operand will be forced to "IN". private_setting_name_value_pairs_operator => null|STR The operator to use for combining (name = value) OPERATOR (name = value); default AND private_setting_name_prefix => STR A prefix to apply to all private settings. Used to namespace plugin user settings or by plugins to namespace their own settings. |
return | mixed | int If count, int. If not count, array. false on errors. |
public removeAllForEntity ( integer $entity_guid ) : boolean | ||
$entity_guid | integer | The Entity GUID |
return | boolean |