getModel() public method

public getModel ( boolean $need = true ) : Nextras\Orm\Model\IModel
$need boolean
return Nextras\Orm\Model\IModel
Ejemplo n.º 1
0
 protected function getParser()
 {
     if (!$this->parser) {
         $this->parser = new ConditionParser($this->repository->getModel(), $this->repository->getMapper());
     }
     return $this->parser;
 }
 protected function getParser()
 {
     if ($this->parser === NULL) {
         $this->parser = new QueryBuilderHelper($this->repository->getModel(), $this->repository->getMapper());
     }
     return $this->parser;
 }
 protected function getHelper()
 {
     if ($this->helper === NULL) {
         $this->helper = new ArrayCollectionHelper($this->repository->getModel(), $this->repository->getMapper());
     }
     return $this->helper;
 }
Ejemplo n.º 4
0
 public function __construct(Nextras\Orm\Entity\IEntity $entity, Nextras\Orm\Repository\IRepository $repository)
 {
     parent::__construct();
     $this->entity = $entity;
     $this->repository = $repository;
     $this->metadata = $entity->getMetadata();
     $this->mapper = $repository->getMapper();
     $this->model = $repository->getModel();
     $this->monitor(Ytnuk\Orm\Form::class);
     $repository->attach($entity);
 }