Exemplo n.º 1
0
 /**
  * getModel
  *
  * @param string $name
  * @param mixed  $source
  * @param bool   $forceNew
  *
  * @return ModelRepository
  *
  * @throws \DomainException
  */
 public function getModel($name = null, $source = null, $forceNew = false)
 {
     // Force the singular model
     if ($name === null && !$this->model instanceof ModelRepository) {
         if (is_string($this->model)) {
             $name = $this->model;
         } else {
             $name = $name ?: $this->config['item_name'];
         }
     }
     return parent::getModel($name, $source, $forceNew);
 }