public function __construct(GenericDAO $dao) { $this->dao = $dao; $this->className = $dao->getObjectName(); if (($cache = Cache::me()) instanceof WatermarkedPeer) { $this->watermark = $cache->mark($this->className)->getActualWatermark(); } }
public function __construct(Identifiable $parent, GenericDAO $dao, $lazy = true) { Assert::isBoolean($lazy); $this->parent = $parent; $this->lazy = $lazy; $this->dao = $dao; Assert::isInstance($dao->getObjectName(), Identifiable::class); $this->comparator = SerializedObjectComparator::me(); }
public function uncache() { foreach ($this->daoMap as $daoClass => $uncacheData) { $dao = GenericDAO::getInstance($daoClass); /* @var $dao GenericDAO */ list($dropIdentityIds, $workerUncacher) = $uncacheData; /* @var $workerUncacher UncacherBase */ foreach ($dropIdentityIds as $id) { $dao->dropObjectIdentityMapById($id); } $dao->registerWorkerUncacher($workerUncacher); } }
/** * @return DB **/ public static function getByDao(GenericDAO $dao) { return self::me()->getLink($dao->getLinkName()); }