Jeff PHP framework  0.99
Modular, extensible, OOP, MVC, lightweight php framework designed to ease the programmers in the development of web applications.
singleton Class Reference

Singleton primitive class. More...

+ Inheritance diagram for singleton:

Public Member Functions

 __clone ()
 Clone method.
 __sleep ()
 Sleep method.
 __wakeup ()
 Wakeup method.

Static Public Member Functions

static instance ()
 Method used to retrieve singleton instances.

Protected Member Functions

 __construct ()
 Singleton constructor.

Static Protected Attributes

static $_instances = array()

Detailed Description

Singleton primitive class.

Class which implemets the singleton pattern and assures the existence of only one object instance

Author:
abidibo abidi.nosp@m.bo@g.nosp@m.mail..nosp@m.com
Version:
0.99
Date:
2011-2012

Definition at line 23 of file singleton.class.php.


Constructor & Destructor Documentation

singleton::__construct ( ) [protected]

Singleton constructor.

This method is protected in order to deny direct object instantiation outside this class and the ones which extends it

Returns:
void

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


Member Function Documentation

Clone method.

Singleton cloning is denied

Returns:
error

Definition at line 67 of file singleton.class.php.

+ Here is the call graph for this function:

Sleep method.

Singleton serialization is denied

Returns:
error

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

+ Here is the call graph for this function:

Wakeup method.

Singleton serialization is denied

Returns:
error

Definition at line 89 of file singleton.class.php.

+ Here is the call graph for this function:

static singleton::instance ( ) [static]

Method used to retrieve singleton instances.

if the singleton instance already exists returns it, otherwise creates an instance and returns it

Returns:
mixed the singleton instance

Reimplemented in db.

Definition at line 49 of file singleton.class.php.

+ Here is the caller graph for this function:


Field Documentation

singleton::$_instances = array() [static, protected]

Definition at line 28 of file singleton.class.php.


The documentation for this class was generated from the following file: