-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBootstrap.php
35 lines (28 loc) · 1.26 KB
/
Bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace panix\mod\shop;
use yii\base\BootstrapInterface;
class Bootstrap implements BootstrapInterface
{
public function bootstrap($app)
{
$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:(ajax)>/<action:\w+>',
// 'route' => $this->id . '/<controller>/<action>'
// ],
[
// 'class' => 'yii\web\UrlRule',
'pattern' => 'shop/<controller:\w+>/<action:\w+>/<id:\d+>',
'route' => 'shop/<controller>/<action>'
],
], false);
// rename(\Yii::getAlias('@vendor/panix/mod-shop').DIRECTORY_SEPARATOR."README.md", \Yii::getAlias('@vendor/panix/mod-shop').DIRECTORY_SEPARATOR."111README.md");
}
public static function init(){
echo 'GGGGGGGGGGGGGGGGGGGGGGGGGGGG';
// rename(\Yii::getAlias('@shop').DIRECTORY_SEPARATOR."README.md", \Yii::getAlias('@shop').DIRECTORY_SEPARATOR."111README.md");
}
}