Ejemplo n.º 1
0
 public static function getInstance()
 {
     if (null === static::$_view) {
         static::$_view = new static();
     }
     return static::$_view;
 }
 public static function register($view)
 {
     if ($view instanceof \yii\base\View) {
         static::$_view = $view;
         static::$_module = static::$_view->context->module->id;
     } else {
         throw new \yii\base\NotSupportedException('invalid view object');
     }
 }
Ejemplo n.º 3
0
 /**
  * Dependency setter for View object
  *
  * @param \ToucaNine\View\ViewInterface
  *
  * @return void
  *
  * @access public
  *
  * @static
  */
 public static function setView(ViewInterface $view)
 {
     static::$_view = $view;
 }
Ejemplo n.º 4
0
 public static function setView($class, $handler, $response)
 {
     static::$_view = $class::view($handler, array(), $response);
 }