/** * 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) { if (!empty($config['engine']) && $config['engine'] instanceof EngineInterface) { $this->engine = $config['engine']; } parent::__construct($model, $container, $config); // Setup dependencies. $this->paths = $paths ?: $this->loadPaths(); }
/** * Method to instantiate the view. * * @param Model $model The model object. * @param Container $container DI Container. * @param array $config View config. */ public function __construct(Model $model = null, Container $container = null, $config = array()) { parent::__construct($model, $container, $config); $this->data = new Registry(); }