protected function createRule()
{
foreach ($this->rules as $controller => $rule) {
foreach ($rule as $singleRule) {
if (is_array($singleRule)) {
$option = ['controllers' => [$controller], 'class' => 'yii\\filters\\AccessRule'];
$this->_rules[] = Yii::createObject(array_merge($option, $singleRule));
}
}
}
}