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'); } }
/** * Dependency setter for View object * * @param \ToucaNine\View\ViewInterface * * @return void * * @access public * * @static */ public static function setView(ViewInterface $view) { static::$_view = $view; }
public static function setView($class, $handler, $response) { static::$_view = $class::view($handler, array(), $response); }