|
|
|
@ -194,7 +194,7 @@ class Controller extends Component implements ViewContextInterface
|
|
|
|
|
$actionMap = $this->actions(); |
|
|
|
|
if (isset($actionMap[$id])) { |
|
|
|
|
return Yii::createObject($actionMap[$id], $id, $this); |
|
|
|
|
} elseif (preg_match('/^[a-z0-9\\-_]+$/', $id)) { |
|
|
|
|
} elseif (preg_match('/^[a-z0-9\\-_]+$/', $id) && strpos($id, '--') === false && trim($id, '-') === $id) { |
|
|
|
|
$methodName = 'action' . str_replace(' ', '', ucwords(implode(' ', explode('-', $id)))); |
|
|
|
|
if (method_exists($this, $methodName)) { |
|
|
|
|
$method = new \ReflectionMethod($this, $methodName); |
|
|
|
|