Esempio n. 1
0
 /**
  * @inheritdoc
  */
 public function bootstrap($app)
 {
     if ($app instanceof \yii\web\Application) {
         $app->getUrlManager()->addRules([$this->id => $this->id . '/default/index', $this->id . '/<id:\\w+>' => $this->id . '/default/view', $this->id . '/<controller:[\\w\\-]+>/<action:[\\w\\-]+>' => $this->id . '/<controller>/<action>'], false);
     } elseif ($app instanceof \yii\console\Application) {
         $app->controllerMap[$this->id] = ['class' => Oauth2Controller::className()];
     }
 }
Esempio n. 2
0
 /**
  * @inheritdoc
  */
 public function bootstrap($app)
 {
     if ($app instanceof \yii\console\Application) {
         $app->controllerMap[$this->id] = ['class' => Oauth2Controller::className()];
     }
 }