public function __construct() { if (self::$instances === null) { self::$instances = new \splObjectStorage(); } self::$instances->attach($this); }
public static function setStorage(adapter\storage $storage = null) { self::$storage = $storage ?: new adapter\storage(); }