예제 #1
0
파일: YiiPlugin.php 프로젝트: oakcms/oakcms
 /**
  * Callback for 'boot' event.
  */
 public function boot(Event $event, Application $app)
 {
     if (!is_dir($app['path.cache']) && !mkdir($app['path.cache'], 0777, true)) {
         throw new \RuntimeException(sprintf('Unable to create cache folder in "%s"', $app['path.cache']));
     }
     $this->init();
     $app->trigger('init', array($app));
     $app['yii']->on(\yii\web\View::EVENT_BEGIN_BODY, function () use($app) {
         $app->trigger('view', array($app));
     });
 }