/** * @throws WrongArgumentException * @return PrimitiveForm * @deprecated You should use ofProto() instead **/ public function of($className) { Assert::classExists($className); $protoClass = EntityProto::PROTO_CLASS_PREFIX . $className; Assert::classExists($protoClass); return $this->ofProto(Singleton::getInstance($protoClass)); }
/** * @return SafeUtf8Filter **/ public static function me() { return Singleton::getInstance(__CLASS__); }
public function __wakeup() { $this->dao = Singleton::getInstance($this->daoClass); $this->worker = new $this->workerClass($this); }
public function __wakeup() { if ($this->daoClass) { $this->dao = Singleton::getInstance($this->daoClass); } }
/** * @throws MissingElementException * @return GenerationPattern **/ private function guessPattern($name) { $class = '\\Hesper\\Meta\\Pattern\\' . $name . 'Pattern'; if (!class_exists($class)) { throw new MissingElementException("unknown pattern '{$name}'"); } return Singleton::getInstance($class); }
public function __construct($segmentId) { parent::__construct($segmentId); $this->locker = Singleton::getInstance(eAcceleratorLocker::class); }
public static function me() { return Singleton::getInstance(self::class); }
/** * @return CachePeer **/ public function clean() { foreach (Singleton::getAllInstances() as $object) { if ($object instanceof GenericDAO) { $object->dropIdentityMap(); } } return $this; }