/** * Получить вложенный * * @param $name * @return AbstractCond */ public function getChild($name) { if (!isset($this->childList[$name])) { $this->addChild($name, AbstractModel::condFactory($name)); } return $this->childList[$name]; }
public function remove(AbstractModel &$entity) { $this->em->remove($entity->getId()); $class = get_class($entity); $entity = new $class(); }