-
Notifications
You must be signed in to change notification settings - Fork 0
/
Module.php
37 lines (31 loc) · 895 Bytes
/
Module.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
36
37
<?php
/**
* _ __ __ _____ _____ ___ ____ _____
* | | / // // ___//_ _// || __||_ _|
* | |/ // /(__ ) / / / /| || | | |
* |___//_//____/ /_/ /_/ |_||_| |_|
* @link https://vistart.name/
* @copyright Copyright (c) 2016 vistart
* @license https://vistart.name/license/
*/
namespace rhoone\task;
/**
* Description of Module
*
* @author vistart <[email protected]>
*/
class Module extends \yii\base\Module implements \yii\base\BootstrapInterface
{
public $id = 'rhoone-task';
public $controllerNamespace = 'rhoone\task\controllers';
public function bootstrap($app)
{
if ($app instanceof \yii\web\Application) {
$rules = [
'task' => $this->id . '/task/index',
'task/<id:\w+>' => $this->id . '/task/detail'
];
$app->getUrlManager()->addRules($rules);
}
}
}