2019-12-23 16:28:30 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace dominion\cron;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* cron module definition class
|
|
|
|
*/
|
|
|
|
class Module extends \yii\base\Module
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public $controllerNamespace = 'dominion\cron\controllers';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function init()
|
|
|
|
{
|
|
|
|
parent::init();
|
|
|
|
|
|
|
|
// custom initialization code goes here
|
|
|
|
}
|
2019-12-24 13:54:32 +03:00
|
|
|
public function bootstrap($app)
|
|
|
|
{
|
|
|
|
if ($app instanceof \yii\console\Application) {
|
|
|
|
$app->controllerMap[$this->id] = [
|
|
|
|
'class' => 'dominion\cron\console\MoleController',
|
|
|
|
'module' => $this,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-23 16:28:30 +03:00
|
|
|
}
|