本文整理汇总了PHP中yii\console\Controller::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller::__construct方法的具体用法?PHP Controller::__construct怎么用?PHP Controller::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\console\Controller
的用法示例。
在下文中一共展示了Controller::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($id, $module, $config = [])
{
parent::__construct($id, $module, $config);
if (isset(Yii::$app->components['rbac-console'])) {
$this->collection = Yii::$app->components['rbac-console'];
}
$this->auth = Yii::$app->authManager;
}
示例2: __construct
/**
* MaintenanceController constructor.
* @param StorageInterface $packageStorage
* @param PackageRepository $packageRepository
* @inheritdoc
*/
public function __construct($id, $module, StorageInterface $packageStorage, PackageRepository $packageRepository, $config = [])
{
parent::__construct($id, $module, $config);
$this->packageStorage = $packageStorage;
$this->packageRepository = $packageRepository;
}
示例3: __construct
/**
* @param string $id
* @param \yii\base\Module $module
* @param Finder $finder
* @param array $config
*/
public function __construct($id, $module, Finder $finder, $config = [])
{
$this->finder = $finder;
parent::__construct($id, $module, $config);
}
示例4: __construct
public function __construct($id, $module, $config = array())
{
$this->defaultAction = 'create';
parent::__construct($id, $module, $config);
}
示例5: __construct
public function __construct($id, $module, $config = array())
{
parent::__construct($id, $module, $config);
//Setup the authManager as per config
$this->_authManager = \Yii::$app->authManager;
}
示例6: __construct
/**
* @param string $id
* @param \yii\base\Module $module
* @param ConfigInterface $flowConfig
* @param array $config
*/
public function __construct($id, $module, ConfigInterface $flowConfig, $config = array())
{
$this->flowConfig = $flowConfig;
parent::__construct($id, $module, $config);
}
示例7: __construct
public function __construct($id, $module, $config = array())
{
$this->manager = Yii::$app->authManager;
$this->roleRule = new UserRoleRule();
parent::__construct($id, $module, $config);
}
示例8: __construct
public function __construct($id, $module, BrowserInfo $browserInfo, $config = [])
{
$this->browserInfo = $browserInfo;
parent::__construct($id, $module, $config);
}