/** * @param string $key * @param string $invalidValue * @param string $regexPattern * @param int $code * @param \Exception $previous */ public function __construct($key, $invalidValue, $regexPattern, $code = 0, \Exception $previous = null) { $message = sprintf('Invalid value (%1$s) for entry "%2$s", pattern is: "%3$s".', $invalidValue, $key, $regexPattern); parent::__construct($message, $code, $previous); }
/** * @param string $invalidWeight * @param int $maximumWeight * @param int $code * @param \Exception $previous */ public function __construct($invalidWeight, $maximumWeight, $code = 0, \Exception $previous = null) { $message = sprintf('Invalid weight (%1$s kg), maximum is %2$s.', $invalidWeight, $maximumWeight); parent::__construct($message, $code, $previous); }
/** * BpostInvalidLengthException constructor. * @param string $nameEntry * @param int $invalidLength * @param int $maximumLength * @param int $code * @param \Exception $previous */ public function __construct($nameEntry, $invalidLength, $maximumLength, $code = 0, \Exception $previous = null) { $message = sprintf('Invalid length for entry "%1$s" (%2$s characters), maximum is %3$s.', $nameEntry, $invalidLength, $maximumLength); parent::__construct($message, $code, $previous); }
/** * @param string $key * @param string $invalidValue * @param array $allowedValues * @param int $code * @param \Exception $previous */ public function __construct($key, $invalidValue, array $allowedValues, $code = 0, \Exception $previous = null) { $message = sprintf('Invalid value (%1$s) for %2$s, possible values are: %3$s.', $invalidValue, $key, implode(', ', $allowedValues)); parent::__construct($message, $code, $previous); }