WIKINDX API trunk

FACTORY_RESOURCEMAP
in package

FACTORY_RESOURCEMAP

Create objects for commonly used classes. Theoretically, this should save time in loading classes using include() statements and, perhaps, memory by not having multiple instances of the same object. Many WIKINDX classes have busy __construct() methods (initializing arrays etc.). Using FACTORY ensures that this work is only done once each time the web server deals with a script -- subsequent class instantiations in the same server call return only the already constructed object.

e.g. To call the FACTORY SESSION object: $this->session = FACTORY_SESSION::getInstance();

Table of Contents

Methods

getFreshInstance()  : object
Get fresh instance
getInstance()  : object
Get instance

Methods

getFreshInstance()

Get fresh instance

public static getFreshInstance([mixed $exception = false ]) : object
Parameters
$exception : mixed = false
Return values
object

(self::$instance)

getInstance()

Get instance

public static getInstance([mixed $exception = false ]) : object
Parameters
$exception : mixed = false
Return values
object

(self::$instance)


        
On this page

Search results