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

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

Returns the value of the specified argument
public getArgument ( string $argumentName ) : string
$argumentName string Name of the argument
Результат string Value of the argument
    public function getArgument($argumentName)
    {
        if (!isset($this->arguments[$argumentName])) {
            throw new Exception\NoSuchArgumentException('An argument "' . $argumentName . '" does not exist for this request.', 1176558158);
        }
        return $this->arguments[$argumentName];
    }

Usage Example

 /**
  * Maps arguments delivered by the request object to the local controller arguments.
  *
  * @return void
  * @throws RequiredArgumentMissingException
  * @api
  */
 protected function mapRequestArgumentsToControllerArguments()
 {
     foreach ($this->arguments as $argument) {
         $argumentName = $argument->getName();
         if ($this->request->hasArgument($argumentName)) {
             $argument->setValue($this->request->getArgument($argumentName));
         } elseif ($argument->isRequired()) {
             throw new RequiredArgumentMissingException('Required argument "' . $argumentName . '" is not set.', 1298012500);
         }
     }
 }
All Usage Examples Of Neos\Flow\Mvc\ActionRequest::getArgument