FACTORY_CLOSERAW
in package
FACTORY_CLOSERAW
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
Properties
- $instance : mixed
- object
Methods
- getInstance() : object
- Get instance
Properties
$instance
object
public
static mixed
$instance
Methods
getInstance()
Get instance
public
static getInstance([string|null $ContentType = null ]) : object
If $ContentType is not NULL, then the Content-type header is defined with the value of this parameter
Parameters
- $ContentType : string|null = null
-
Mime-type of the content sent to the HTTP client (default is NULL)
Return values
object —(self::$instance)