Protected Member Functions | Static Protected Member Functions

Singleton Class Reference

Inheritance diagram for Singleton:

List of all members.

Protected Member Functions

 __construct ()

Static Protected Member Functions

static instance ()
static getInstanceOf ($class)

Detailed Description

Habari Singleton class

Singleton base class for subclassing generic singleton pattern classes

Definition at line 15 of file singleton.php.

Constructor & Destructor Documentation

Singleton::__construct (  )  [final, protected]

Prevent instance construction and cloning (copying of object instance)

Definition at line 59 of file singleton.php.

Member Function Documentation

static Singleton::getInstanceOf ( class  )  [static, protected]

Returns the single shared static instance variable which facilitates the Singleton pattern

each subclass should implement an instance() method which passes the class name to the parent::getInstanceOf() function.
string $class Name of the class to return the instance of
object instance

Definition at line 47 of file singleton.php.

Referenced by URL::instance(), Update::instance(), instance(), DB::instance(), Controller::instance(), and Options::instance().

static Singleton::instance (  )  [static, protected]

Declarations that extend this method must have the same signature (arguments and returned types) to pass E_STRICT

object instance

Reimplemented in Controller, DB, Options, Update, and URL.

Definition at line 26 of file singleton.php.

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