Neos\Flow\Mvc\Controller\Argument::__construct PHP Method

__construct() public method

Constructs this controller argument
public __construct ( string $name, string $dataType )
$name string Name of this argument
$dataType string The data type of this argument
    public function __construct($name, $dataType)
    {
        if (!is_string($name)) {
            throw new \InvalidArgumentException('$name must be of type string, ' . gettype($name) . ' given.', 1187951688);
        }
        if (strlen($name) === 0) {
            throw new \InvalidArgumentException('$name must be a non-empty string, ' . strlen($name) . ' characters given.', 1232551853);
        }
        $this->name = $name;
        $this->dataType = TypeHandling::normalizeType($dataType);
    }