public function bootstrap($app)
{
if ($app instanceof \yii\web\Application) {
$app->getUrlManager()->addRules([['class' => 'yii\\web\\UrlRule', 'pattern' => $this->id, 'route' => $this->id . '/default/index'], ['class' => 'yii\\web\\UrlRule', 'pattern' => $this->id . '/<id:\\w+>', 'route' => $this->id . '/default/view'], ['class' => 'yii\\web\\UrlRule', 'pattern' => $this->id . '/<controller:[\\w\\-]+>/<action:[\\w\\-]+>', 'route' => $this->id . '/<controller>/<action>']], false);
} elseif ($app instanceof \yii\console\Application) {
$app->controllerMap[$this->id] = ['class' => 'yii\\gii\\console\\GenerateController', 'generators' => array_merge($this->coreGenerators(), $this->generators), 'module' => $this];
}
}