/** * Do domain watcher * * If an existing entity is already stored in the domain watcher, return this entity in * preference to the newly created one. * * @param Domain\AbstractDomain $object * @return Domain\AbstractDomain */ protected final function doDomainWatcher(Domain\AbstractDomain $object) { if ($exists = $this->watcher->exists($this->getShortType($object), $object->getId())) { return $exists; } $this->watcher->add($object); return $object; }