Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes

factory Class Reference

Static Public Member Functions

static init ()
static initCache ()
static saveCache ()
static loadCfg ($className, $searchParent=true)
static mergeCfg (array &$prm, array $cfg)
static get ($className, array $cfg=array())
static getHelper ($className, array $cfg=array())
static getModule ($name, array $cfg=array(), &$scaffold=false, $allowScaffold=true)
static load ($className)
static isCreable ($className)

Private Member Functions

 __construct ()

Static Private Member Functions

static removeKeepUnique (array &$prm)

Static Private Attributes

static $cfg
static $loadedCfg = array()
static $loadedClass = array()
static $loadFiles = array()
static $cacheLoad = null
static $saveCacheLoad = false
static $constants

Detailed Description

To create new object, with automaticly configuration

Definition at line 10 of file factory.class.php.


Constructor & Destructor Documentation

__construct (  )  [private]

No instanciation for this class

Definition at line 65 of file factory.class.php.


Member Function Documentation

static get ( className,
array $  cfg = array() 
) [static]

Get a new object, with loading its definition and configuration

Parameters:
string $className The classname to create
array $cfg The config
Returns:
object The new object

Definition at line 185 of file factory.class.php.

static getHelper ( className,
array $  cfg = array() 
) [static]

Get a new helper object, with loading its definition and configuration

Parameters:
string $className The helper to create
array $cfg The config
Returns:
stdClass The new object

Definition at line 204 of file factory.class.php.

static getModule ( name,
array $  cfg = array(),
&$  scaffold = false,
allowScaffold = true 
) [static]

Get a module, with scaffholding if possible

Parameters:
string $name Module name (or table name)
array $cfg Configuration array for the module
bool &$scaffold Indicate if the module was scaffolded
bool $allowScaffold indicate if the module should be scaffolded
Returns:
module_abstract The new module
Exceptions:
module_exception If module not creable

Definition at line 218 of file factory.class.php.

static init (  )  [static]

Initialize the factory configuration

Definition at line 70 of file factory.class.php.

static initCache (  )  [static]

Initialize the cache objects

Definition at line 79 of file factory.class.php.

static isCreable ( className  )  [static]

Check if a className is creable (ie if it's file exists)

Returns:
bool

Definition at line 280 of file factory.class.php.

static load ( className  )  [static]

Load a class definition

Parameters:
string $className The className to load
Returns:
true If success
Exceptions:
nExecption If the file isn't find

Definition at line 238 of file factory.class.php.

static loadCfg ( className,
searchParent = true 
) [static]

Return the configuration for a className

Parameters:
string $className ClassName to load its configuration
bool $searchParent Indicate if the parent and implements class configuration should be searched
Returns:
array Cfg Array parameter

Definition at line 106 of file factory.class.php.

static mergeCfg ( array &$  prm,
array $  cfg 
) [static]

Merge two cfg arrays

Parameters:
array $prm Initial array
array $cfg Array with the parameter to overload

Definition at line 148 of file factory.class.php.

static removeKeepUnique ( array &$  prm  )  [static, private]

Remove the keepUnique key

Parameters:
array $prm Configuration array

Definition at line 170 of file factory.class.php.

static saveCache (  )  [static]

Save the cache

Definition at line 93 of file factory.class.php.


Field Documentation

$cacheLoad = null [static, private]

Definition at line 45 of file factory.class.php.

$cfg [static, private]

Definition at line 17 of file factory.class.php.

$constants [static, private]

Definition at line 59 of file factory.class.php.

$loadedCfg = array() [static, private]

Definition at line 24 of file factory.class.php.

$loadedClass = array() [static, private]

Definition at line 31 of file factory.class.php.

$loadFiles = array() [static, private]

Definition at line 38 of file factory.class.php.

$saveCacheLoad = false [static, private]

Definition at line 52 of file factory.class.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Enumerations
Generated on Tue May 8 2012 16:02:25 for nyroFwk by doxygen 1.7.1