Class CriticalI_Property

Description

CriticalI_Property is a class for working with user-level properties defined within the repository.

Located in /Core/lib/CriticalI/Property.php (line 10)


	
			
Variable Summary
 static mixed $list
 mixed $properties
Method Summary
 static array all ()
 static boolean exists (string $name)
 static mixed get (string $name, [string $default = null])
 static void listing ()
 static string remove (string $name)
 static array remove_multiple (array $names)
 static void set (string $name, string $value)
 static void set_multiple (array $properties)
 CriticalI_Property __construct ()
 void batch_save (array $properties)
 array delete_properties (array $properties)
 void load ()
 void save ( $key,  $value)
 void validateKeys ( $properties)
Variables
static mixed $list = null (line 11)
  • access: protected
mixed $properties (line 13)
  • access: protected
Methods
static all (line 47)

Return all properties as an associative array

  • access: public
array all ()
static exists (line 36)

Test for the existence of a property

  • access: public
boolean exists (string $name)
  • string $name: The name of the property to test
static get (line 22)

Get the value of a property

  • access: public
mixed get (string $name, [string $default = null])
  • string $name: The name of the property to retrieve
  • string $default: The value to return if the property does not exist (optional)
static listing (line 122)

Return the shared class instance

  • access: protected
void listing ()
static remove (line 87)

Remove (delete) a property. The change is immediately saved to disk.

  • return: The previous value of the property (if any)
  • access: public
string remove (string $name)
  • string $name: The name of the property to remove
static remove_multiple (line 102)

Remove (delete) a set of properties. The changes are immediately saved to disk.

  • return: The previous values of the properties as an associative array
  • access: public
array remove_multiple (array $names)
  • array $names: The list of property names to remove
static set (line 59)

Set the value of a property. The property is immediately saved to disk.

  • access: public
void set (string $name, string $value)
  • string $name: The name of the property to set
  • string $value: The value to set it to
static set_multiple (line 75)

Set the value of a several properties at once.

The properties are specified as an associative array with the array keys representing the property names to set and the array values corresponding to the respective values to set for the properties. The properties are immediately saved to disk as a batch.

  • access: public
void set_multiple (array $properties)
  • array $properties: The collection of properties to set
Constructor __construct (line 113)

Constructor.

This class may not be directly instantiated.

  • access: protected
CriticalI_Property __construct ()
batch_save (line 164)

Write a collection of properties to the repository

  • access: protected
void batch_save (array $properties)
  • array $properties: An associative array of properties to set
delete_properties (line 191)

Remove a collection of properties from the repository

  • return: The previous values of the properties as an associative array
  • access: protected
array delete_properties (array $properties)
  • array $properties: A list of property names to remove
load (line 131)

Load the properties from the repository

  • access: protected
void load ()
save (line 144)

Write a property to the repository

  • access: protected
void save ( $key,  $value)
  • $key
  • $value
validateKeys (line 151)

Validates that the key values in a set of properties are valid

  • access: protected
void validateKeys ( $properties)
  • $properties

Documentation generated on Wed, 25 Apr 2012 09:46:44 -0700 by phpDocumentor 1.4.3