Documentation

Kernel
in package

AbstractYes

Table of Contents

Properties

$counter  : int
$instances  : mixed

Methods

__wakeup()  : mixed
Singletons should not be restorable from strings.
getInstance()  : mixed
Returns the singleton instance.
__clone()  : mixed
Singletons should not be cloneable.
__construct()  : mixed
Constructor has to be protected to avoid instantiation from outside.

Properties

$counter

public static int $counter = 0

Counter self instances

$instances

private static mixed $instances = []

can be an object from View, Response or any other class that uses singleton pattern.

Methods

__wakeup()

Singletons should not be restorable from strings.

public __wakeup() : mixed

getInstance()

Returns the singleton instance.

public static getInstance() : mixed

__clone()

Singletons should not be cloneable.

protected __clone() : mixed

__construct()

Constructor has to be protected to avoid instantiation from outside.

protected __construct() : mixed

        
On this page

Search results