Neos\Flow\Mvc\ActionRequest::setControllerName PHP Метод

setControllerName() публичный Метод

Note: This is not the object name of the controller! Examples: "Standard", "Account", ...
public setControllerName ( string $controllerName ) : void
$controllerName string Name of the controller
Результат void
    public function setControllerName($controllerName)
    {
        if (!is_string($controllerName)) {
            throw new Exception\InvalidControllerNameException('The controller name must be a valid string, ' . gettype($controllerName) . ' given.', 1187176358);
        }
        if (strpos($controllerName, '_') !== false) {
            throw new Exception\InvalidControllerNameException('The controller name must not contain underscores.', 1217846412);
        }
        $this->controllerName = $controllerName;
    }

Usage Example

 /**
  * @test
  * @param mixed $invalidControllerName
  * @dataProvider invalidControllerNames
  * @expectedException \Neos\Flow\Mvc\Exception\InvalidControllerNameException
  */
 public function setControllerNameThrowsExceptionOnInvalidControllerNames($invalidControllerName)
 {
     $this->actionRequest->setControllerName($invalidControllerName);
 }
All Usage Examples Of Neos\Flow\Mvc\ActionRequest::setControllerName