# Singleton Class Reference
[Widely used base classes and interfaces, Classes implemented in PHP's extension.]

Inheritable Singleton's pattern implementation. More...

Inheritance diagram for Singleton:
[legend]

List of all members.

## Static Public Member Functions

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

## 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 18 of file Singleton.class.php.

## Constructor & Destructor Documentation

Singleton::__construct | ( |  | ) | `[protected]`

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

## Member Function Documentation

Singleton::__clone | ( |  | ) | `[final, private]`

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

Singleton::__sleep | ( |  | ) | `[final, private]`

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

static Singleton::dropInstance | ( | $ | class | ) | `[static, final]`

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

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

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

Referenced by CachePeer::clean().

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

Examples:
  singleton.php.

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

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

Referenced by eAcceleratorSegmentHandler::__construct(), SemaphorePool::__construct(), UnifiedContainer::__wakeup(), Criteria::__wakeup(), BusinessClassBuilder::build(), MetaConfiguration::guessPattern(), Filter::htmlSpecialChars(), Filter::lowerCase(), MetaConfiguration::me(), SortHelper::me(), RouterRewrite::me(), ArgumentParser::me(), MtRandomSource::me(), GmpBigIntegerFactory::me(), YandexRssItemWorker::me(), YandexRssFeedFormat::me(), RssItemWorker::me(), RssFeedFormat::me(), RssChannelWorker::me(), AtomItemWorker::me(), AtomFeedFormat::me(), AtomChannelWorker::me(), StandardComparator::me(), SerializedObjectComparator::me(), ImmutableObjectComparator::me(), DateObjectComparator::me(), Utf16ConverterFilter::me(), UrlEncodeFilter::me(), UrlDecodeFilter::me(), UpperCaseFilter::me(), UnTypographizer::me(), UnserializeFilter::me(), UnixToUnixEncode::me(), UnixToUnixDecode::me(), SafeUtf8Filter::me(), RussianTypograph::me(), RemoveNewlineFilter::me(), Paragraphizer::me(), NewLinesToBreaks::me(), LowerCaseFilter::me(), JsonEncoderFilter::me(), JsonDecoderFilter::me(), HtmlSpecialCharsFilter::me(), DateRangeDisplayFilter::me(), CompressWhitespaceFilter::me(), PostgresDialect::me(), MyImprovedDialect::me(), MyDialect::me(), LiteDialect::me(), ImaginaryDialect::me(), DBPool::me(), SemaphorePool::me(), MemcachedLocker::me(), Filter::nl2br(), PrimitiveForm::of(), Filter::safeUtf8(), SemaphorePool::setDefaultLocker(), Filter::upperCase(), Filter::urldecode(), Filter::urlencode(), Filter::uudecode(), and Filter::uuencode().

Here is the call graph for this function:

## Member Data Documentation

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

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

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

- core/Base/Singleton.class.php