formats = [ 'string' => [ 'date' => \Opis\JsonSchema\Formats\DateTimeFormats::class . '::date', 'time' => \Opis\JsonSchema\Formats\DateTimeFormats::class . '::time', 'date-time' => \Opis\JsonSchema\Formats\DateTimeFormats::class . '::dateTime', 'duration' => \Opis\JsonSchema\Formats\DateTimeFormats::class . '::duration', 'uri' => \Opis\JsonSchema\Formats\UriFormats::class . '::uri', 'uri-reference' => \Opis\JsonSchema\Formats\UriFormats::class . '::uriReference', 'uri-template' => \Opis\JsonSchema\Formats\UriFormats::class . '::uriTemplate', 'regex' => \Opis\JsonSchema\Helper::class . '::isValidPattern', 'ipv4' => \Opis\JsonSchema\Formats\MiscFormats::class . '::ipv4', 'ipv6' => \Opis\JsonSchema\Formats\MiscFormats::class . '::ipv6', 'uuid' => \Opis\JsonSchema\Formats\MiscFormats::class . '::uuid', 'email' => \Opis\JsonSchema\Formats\MiscFormats::class . '::email', 'hostname' => \Opis\JsonSchema\Uri::class . '::isValidHost', 'json-pointer' => \Opis\JsonSchema\JsonPointer::class . '::isAbsolutePointer', 'relative-json-pointer' => \Opis\JsonSchema\JsonPointer::class . '::isRelativePointer', 'idn-hostname' => \Opis\JsonSchema\Formats\IriFormats::class . '::idnHostname', 'idn-email' => \Opis\JsonSchema\Formats\IriFormats::class . '::idnEmail', 'iri' => \Opis\JsonSchema\Formats\IriFormats::class . '::iri', 'iri-reference' => \Opis\JsonSchema\Formats\IriFormats::class . '::iriReference', ], ]; } /** * @param string $name * @param string $type * @return callable|Format|null */ public function resolve(string $name, string $type) { return $this->formats[$type][$name] ?? null; } /** * @param string $name * @return Format[]|callable[]|null */ public function resolveAll(string $name): ?array { $list = null; foreach ($this->formats as $type => $items) { if (isset($items[$name])) { $list[$type] = $items[$name]; } } return $list; } /** * @param string $type * @param string $name * @param Format $format * @return FormatResolver */ public function register(string $type, string $name, \Opis\JsonSchema\Format $format): self { $this->formats[$type][$name] = $format; return $this; } /** * @param string $type * @param string $name * @param callable $format * @return FormatResolver */ public function registerCallable(string $type, string $name, callable $format): self { $this->formats[$type][$name] = $format; return $this; } /** * @param string $type * @param string $name * @return bool */ public function unregister(string $type, string $name): bool { if (isset($this->formats[$type][$name])) { unset($this->formats[$type][$name]); return true; } return false; } public function __serialize(): array { return ['formats' => $this->formats]; } public function __unserialize(array $data): void { $this->formats = $data['formats']; } } __halt_compiler();----SIGNATURE:----uFG4A1VO/9TiZax9wKg5iN8xfKWzsqo9rZzdAmb85jP986Rzcu3EU6KdVMsfUM4eDbgUVS7vcCxjf+5u52iIfXVkNdUS//CrzgfymPnHIaF9Swyy9VQJehciq5HYJxfpv9377fUHR4EczWCUvkdmlV8/d527tyQzA48ymkkhAWTtzhVQtkmUhss9rh32O2qzBkZ0P8VKkTjDUtbLpoZyRncyaVemdWyt1sOGt5DVLv/XIVm4OkLy0aT4W3G16KMPGIYkqgdlugDaBKzDnl2/lfqWzRtdjp0OdUpF+HG8sfDr7dIygjNB1hq80Rdhm/k6U2WLu/bhe40JNVj98B9gWpsxbYjsfWt14jUL27pdbNh5KXs+riF49wuEERWMMXR1uCBmjt5XxmkH7cmunNfFwYir1/yguQjTVanSvEB0ivE5WX3Dflqa7+1dQC/ZabFpgU6ZdIw95rLZz6ZMrG3Thho/ruj9kZ366sQZucvY+tDVsYsrp6cyh3Cb+rVcIkGvTQeTRRvPZnSwN3g69rF5mpmFZpvCu/nJSiWIFnrYc58ebLjm+C0OJJFe2xzloFO8T1WRA8e3EMl6SIC44vsrIBolfTRCQzMPTmcmsIlV9dXpKRhKRTn11XAYSnIPvWBIsyvmUZgyVo+vy8k1dZkbAsSqpKANDxvYlB7lQcLOlLw=----ATTACHMENT:----MTM3NDcwNTg5NjQ2MTU0MiA5NjM4OTcyMDAzMDYyODgxIDI5OTM4NzE4NDEyNzk2MzM=