'TOO_SHORT_ERROR', self::TOO_LONG_ERROR => 'TOO_LONG_ERROR', self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', self::CHECKSUM_FAILED_ERROR => 'CHECKSUM_FAILED_ERROR', self::TYPE_NOT_RECOGNIZED_ERROR => 'TYPE_NOT_RECOGNIZED_ERROR']; public $isbn10Message = 'This value is not a valid ISBN-10.'; public $isbn13Message = 'This value is not a valid ISBN-13.'; public $bothIsbnMessage = 'This value is neither a valid ISBN-10 nor a valid ISBN-13.'; public $type; public $message; public function __construct($type = null, ?string $message = null, ?string $isbn10Message = null, ?string $isbn13Message = null, ?string $bothIsbnMessage = null, ?array $groups = null, $payload = null, array $options = []) { if (\is_array($type)) { $options = \array_merge($type, $options); } elseif (null !== $type) { $options['value'] = $type; } parent::__construct($options, $groups, $payload); $this->message = $message ?? $this->message; $this->isbn10Message = $isbn10Message ?? $this->isbn10Message; $this->isbn13Message = $isbn13Message ?? $this->isbn13Message; $this->bothIsbnMessage = $bothIsbnMessage ?? $this->bothIsbnMessage; } public function getDefaultOption() { return 'type'; } }