mapper = $mapper; $this->globals = $globals; $this->slots = $slots; $this->keyword = $keyword; } /** * @inheritDoc */ public function validate( \Opis\JsonSchema\ValidationContext $context, \Opis\JsonSchema\Schema $schema, ): ?\Opis\JsonSchema\Errors\ValidationError { if ($error = $this->doValidate($context, $schema)) { $uri = $this->lastRefUri; $this->lastRefUri = null; return $this->error($schema, $context, $this->keyword, 'The data must match {keyword}', [ 'keyword' => $this->keyword, 'uri' => (string) $uri, ], $error); } $this->lastRefUri = null; return null; } abstract protected function doValidate( \Opis\JsonSchema\ValidationContext $context, \Opis\JsonSchema\Schema $schema, ): ?\Opis\JsonSchema\Errors\ValidationError; protected function setLastRefUri(?\Opis\JsonSchema\Uri $uri): void { $this->lastRefUri = $uri; } protected function setLastRefSchema(\Opis\JsonSchema\Schema $schema): void { $info = $schema->info(); if ($info->id()) { $this->lastRefUri = $info->id(); } else { $this->lastRefUri = \Opis\JsonSchema\Uri::merge(\Opis\JsonSchema\JsonPointer::pathToFragment($info->path()), $info->idBaseRoot()); } } /** * @param ValidationContext $context * @param Schema $schema * @return ValidationContext */ protected function createContext( \Opis\JsonSchema\ValidationContext $context, \Opis\JsonSchema\Schema $schema, ): \Opis\JsonSchema\ValidationContext { return $context->create($schema, $this->mapper, $this->globals, $this->slots); } /** * @param SchemaLoader $repo * @param JsonPointer $pointer * @param Uri $base * @param array|null $path * @return null|Schema */ protected function resolvePointer( \Opis\JsonSchema\SchemaLoader $repo, \Opis\JsonSchema\JsonPointer $pointer, \Opis\JsonSchema\Uri $base, ?array $path = null, ): ?\Opis\JsonSchema\Schema { if ($pointer->isAbsolute()) { $path = (string)$pointer; } else { if ($pointer->hasFragment()) { return null; } $path = $path ? $pointer->absolutePath($path) : $pointer->path(); if ($path === null) { return null; } $path = \Opis\JsonSchema\JsonPointer::pathToString($path); } return $repo->loadSchemaById(\Opis\JsonSchema\Uri::merge('#' . $path, $base)); } } __halt_compiler();----SIGNATURE:----dotK1IZFBXipd4vnGUMMdnuLeTKdnJygfL5SAxlAFQAtgTcPocbTLqPjKbD7Qa5Q/pcxZZy7RY1QFrtHzgBt30ZkDfTF557tmam5omy5NWkFCUjSM7vYfJ7w4JdYXaot0Tzmb6tCKKn/Dw4hsWDmwb+rlbvtGWgulG27OS0gnaZOVd2VDjr/oaifN39eQP6cgev1pwaQ4afd2IG26CBRfknk0xi+h1TnHuTOqh8m4o1M1I2X49XjQn4v2TQGChyZi/WI0SMhdssZa4CN1CjXp2dA483wd+TJnuUU0hnfUQMtMqowfcxJO99fGIKjVRuswpxyv1SaRNVkJCUC5KdnvDvXb0fmSlhDq1qIrvVUsUUfqdFgdwaNiwxY0PdqzV4aln3p1FQWYbM5lOAT0YSWbZe56gXtjHvjifmsopt0PmISGsDi/rLOFGq1Nr0TulW4LEKLto2ADyapoIwAagjuEaZgEhEQ+PApAx/E0kef9lg82fAra9ENITveXmPVM4dT2IrH1xT5iDU88hziQjJkul98iyJtH44VhKeXlTYjUa+7IbcDaeUWVPgqZNenuZvfWMnwyCF9EI4PZZpgvL6CkziMYRasJDso6EEwG6/9cPNFJgDtVL5nuyiamYdzwtWMISeXz/yTCRGVgT9OeLQGGWZNLSFvBCDDdZ3x3bnXw7U=----ATTACHMENT:----NDcxOTUzNjUzMzkwMzEyOCA5NTE0MDIxODk5MDMxNzg0IDQ5NzEzMDM2NjIxMjM0MzQ=