setValueParser($valueParser); } /** * @inheritDoc */ public function parse (array $args): ?ParseResult { try { return new ParseResult($this->valueParser->parseValue($args[0]), 1); } catch (RangeException $e) { throw new IncorrectParse('Échec du parsage de la valeur "' . $args[0] . '"', 0, $e); } } /** * @inheritDoc */ public function getValueDescription (): string { return $this->valueParser->getValueDescription(); } /** * Le parseur de valeur. * * @return IValueParser Le parseur. * * @see $valueParser * * @noinspection PhpUnused */ public function getValueParser (): IValueParser { return $this->valueParser; } /** * Définit le parseur de valeur * * @param IValueParser $valueParser Le parseur * * @return $this * * @see $valueParser */ public function setValueParser (IValueParser $valueParser): self { $this->valueParser = $valueParser; return $this; } }