Singleton Class Reference
[Widely used base classes and interfacesClasses implemented in PHP's extension.]

Inheritable Singleton's pattern implementation. More...

Inheritance diagram for Singleton:

Inheritance graph
[legend]

List of all members.

Static Public Member Functions

static getInstance ($class, $args=null)
static getAllInstances ()

Protected Member Functions

 __construct ()

Private Member Functions

 __clone ()
 __sleep ()

Static Private Attributes

static $instances = array()


Detailed Description

Inheritable Singleton's pattern implementation.
Examples:

singleton.php.

Definition at line 19 of file Singleton.class.php.


Constructor & Destructor Documentation

Singleton::__construct (  )  [protected]

Reimplemented in SemaphorePool.

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


Member Function Documentation

static Singleton::getInstance ( class,
args = null 
) [static, final]

Examples:
singleton.php.

Definition at line 26 of file Singleton.class.php.

References $args, and Assert::isTrue().

Referenced by eAcceleratorSegmentHandler::__construct(), SemaphorePool::__construct(), UnifiedContainer::__wakeup(), Criteria::__wakeup(), BusinessClassBuilder::build(), Filter::htmlSpecialChars(), Filter::lowerCase(), MetaConfiguration::me(), MtRandomSource::me(), GmpBigIntegerFactory::me(), RssItemWorker::me(), RssFeedFormat::me(), RssChannelWorker::me(), AtomItemWorker::me(), AtomFeedFormat::me(), AtomChannelWorker::me(), UrlEncodeFilter::me(), UrlDecodeFilter::me(), UpperCaseFilter::me(), UnTypographizer::me(), UnixToUnixEncode::me(), UnixToUnixDecode::me(), SafeUtf8Filter::me(), RemoveNewlineFilter::me(), Paragraphizer::me(), NewLinesToBreaks::me(), LowerCaseFilter::me(), HtmlSpecialCharsFilter::me(), DateRangeDisplayFilter::me(), CompressWhitespaceFilter::me(), PostgresDialect::me(), MyImprovedDialect::me(), MyDialect::me(), LiteDialect::me(), ImaginaryDialect::me(), DBPool::me(), SemaphorePool::me(), Filter::nl2br(), Filter::safeUtf8(), SemaphorePool::setDefaultLocker(), Filter::upperCase(), Filter::urldecode(), Filter::urlencode(), Filter::uudecode(), and Filter::uuencode().

Here is the call graph for this function:

static Singleton::getAllInstances (  )  [static, final]

Definition at line 52 of file Singleton.class.php.

Referenced by CachePeer::clean().

Singleton::__clone (  )  [final, private]

Definition at line 57 of file Singleton.class.php.

Singleton::__sleep (  )  [final, private]

Definition at line 58 of file Singleton.class.php.


Member Data Documentation

Singleton::$instances = array() [static, private]

Definition at line 21 of file Singleton.class.php.


The documentation for this class was generated from the following file:
Generated on Sun Dec 9 21:58:28 2007 for onPHP by  doxygen 1.5.4