nyroFwk  0.2
Static Public Member Functions | Private Member Functions | Static Private Attributes
registry Class Reference

Static Public Member Functions

static get ($name)
 
static set ($name, $val)
 
static setInArray ($name, $val, $unique=true)
 
static check ($name)
 

Private Member Functions

 __construct ()
 

Static Private Attributes

static $vars = array()
 

Detailed Description

To store data available for other object. Same use like globals variables Singleton

Definition at line 12 of file registry.class.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )
private

No instanciation for this class

Definition at line 25 of file registry.class.php.

Member Function Documentation

◆ check()

static check (   $name)
static

Check if a variable is registred

Parameters
string$nameValue to test
Returns
bool

Definition at line 78 of file registry.class.php.

◆ get()

static get (   $name)
static

Get the registred variable

Parameters
string$nameValue requested
Returns
mixed The value requested, false if it doesn't exists

Definition at line 33 of file registry.class.php.

◆ set()

static set (   $name,
  $val 
)
static

Registred a variable

Parameters
string$nameName to registred
mixed$valueValue to registred
Returns
bool true if sucessful
Exceptions
nExceptionIf the $name alreadey exists

Definition at line 47 of file registry.class.php.

◆ setInArray()

static setInArray (   $name,
  $val,
  $unique = true 
)
static

Add a string in an array registred variable

Parameters
string$nameName to registred
mixed$valueValue to registred
bool$uniqueIndicate if the value must be unique
Returns
bool true if sucessful

Definition at line 63 of file registry.class.php.

Field Documentation

◆ $vars

$vars = array()
staticprivate

Definition at line 20 of file registry.class.php.


The documentation for this class was generated from the following file:
Generated on Sun Oct 15 2017 22:25:21 for nyroFwk by doxygen 1.8.13