本文整理匯總了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);
}