Total Complexity | 5 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class Bootstrap implements BootstrapInterface |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * Bootstrap method to be called during application bootstrap stage. |
||
17 | * |
||
18 | * @param Application $app the application currently running |
||
19 | */ |
||
20 | public function bootstrap($app) |
||
21 | { |
||
22 | /** |
||
23 | * @var ExchangeModule $module |
||
24 | */ |
||
25 | if ($id = ModuleHelper::getModuleNameByClass()) { |
||
26 | $module = Yii::$app->getModule($id); |
||
27 | if ($module && $module->bootstrapUrlRule) { |
||
28 | Yii::$app->urlManager->enablePrettyUrl = true; |
||
29 | Yii::$app->urlManager->addRules([new UrlRule], $module->appendRule); |
||
|
|||
30 | } |
||
31 | } |
||
32 | } |
||
33 | |||
34 | public function __construct() |
||
36 | } |
||
37 | } |