\FACTORY_GENERIC

FACTORY_GENERIC

Create objects for commonly used classes. This is the generic factory class. Theoretically, this should save time in loading classes using include() statements and, perhaps, memory by not having multiple instances of the same object (NB PHP5 creates references automatically with new). 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 load the PLUGINMESSAGES class: $this->class = FACTORY_GENERIC::getInstance("core/messages/PLUGINMESSAGES.php", 'PLUGINMESSAGES', array('importexportbib', 'importexportbibMessages')); where the third parameter is an optional array of parameters to send to the __construct() method of the called class

Summary

Methods
Properties
Constants
getInstance()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getInstance()

getInstance(  path,   className, mixed||string|int  params = array()) : 

Get instance

Parameters

path
className
mixed||string|int params

Option array of parameters to pass to class

Returns

(self::$instance)