Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
ConfigurationStore Class Reference
+ Collaboration diagram for ConfigurationStore:

Public Member Functions

 load ($str)
 
 reset ()
 
 add ($class, $propName, $pName, $pValue)
 
 get ($class, $propName=null, $pName=null)
 
 getText ()
 

Detailed Description

ConfigurationStore handles (de)serialization of the DocFam->configuration property from/to JSON into a array() struct called "store".

Definition at line 11 of file Class.ConfigurationStore.php.

Member Function Documentation

add (   $class,
  $propName,
  $pName,
  $pValue 
)

Add a configuration parameter into the store

Parameters
string$classThe parameter's class
string$propNameThe property's name
string$pNameThe parameter's name
string$pValueThe parameter's value
Returns
ConfigurationStore

Definition at line 48 of file Class.ConfigurationStore.php.

get (   $class,
  $propName = null,
  $pName = null 
)

Get a configuration parameter from the store

Parameters
string$classThe parameter's class
null$propNameThe property's name. If $propName is null, then it will lookup all parameters matching the $pName
null$pNameThe parameter's name. If $pName is null, then it will lookup all parameters matching the $propName
Returns
array|null null on error, or array() containing the queried properties' parameters

Definition at line 67 of file Class.ConfigurationStore.php.

getText ( )

Returns the JSON text serialization of the store

Returns
bool|string boolean false on error, or JSON string on success

Definition at line 102 of file Class.ConfigurationStore.php.

load (   $str)

Load a configuration JSON string into the corresponding array() struct

Parameters
string$strThe configuration's JSON string
Returns
bool boolean true on success, or boolean false on error

Definition at line 20 of file Class.ConfigurationStore.php.

reset ( )

Reset the array() struct

Definition at line 35 of file Class.ConfigurationStore.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen