/**
  * Method to instantiate the view.
  *
  * @param Model             $model     The model object.
  * @param Container         $container DI Container.
  * @param array             $config    View config.
  * @param \SplPriorityQueue $paths     Paths queue.
  */
 public function __construct(Model $model = null, Container $container = null, $config = array(), \SplPriorityQueue $paths = null)
 {
     parent::__construct($model, $container, $config, $paths);
     // Guess the item view as the context.
     if (empty($this->viewList)) {
         $this->viewList = $this->getName();
     }
     // Guess the list view as the plural of the item view.
     if (empty($this->viewItem)) {
         $inflector = Inflector::getInstance();
         $this->viewItem = $inflector->toSingular($this->viewList);
     }
 }
示例#2
0
 /**
  * Method to instantiate the view.
  *
  * @param Model             $model     The model object.
  * @param Container         $container DI Container.
  * @param array             $config    View config.
  * @param \SplPriorityQueue $paths     Paths queue.
  */
 public function __construct(Model $model = null, Container $container = null, $config = array(), \SplPriorityQueue $paths = null)
 {
     $this->engine = new PhpEngine();
     parent::__construct($model, $container, $config, $paths);
 }