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:----RZhI4xP9JMiaJsD9/SLFOTwhblOIkmslkLZElzSpoBtqmL42bF5pJpv7zt8PMmzqvCc03qjnWyr8CDqtUYC2kun0sfnLLrt8XMcQ1oi0J5yvtfiVG7DpaWiUH+KoKJgZhiTrVdk3+AwaBLZo/KtsSY2G2UX8Rs0im5FjVA49EUqMwsnHuZ/srSU2BhtPvUCpxvVWLK+mh1qaVVzUZFGoqGIi+EkiPyxGrJ8ITqTVwUyrEeZk68BnUmY4YZYlOu31Y4Gd5PjNqML3qPnT4DT7OKzn8nG0l9EOyEAr7MPtCfU5/ilRSVD9h/rkP+2OChWFfRErgtY8hCABWc7ECU5aKUJnvCvmsjGl+0bWgDLsvZcDLGqe9eTgz9Ie5GnydQXzA4D0qXNPkOP3oLwhDqxD3fVYgiStfh9oR1Zt8IIkZV8AHtLlk4uC6Eizq3J3Qs7LeVjxLaQd1siIw2DRze2AvV/W01q97zUYKo4q6rWkNqVV1r1JdvnLPZyPlZ/NhA9wS0lbNhdy6Lh9wgMkH1F2/ybxw99QPD5SFFCtChYrMKGhlhkr7kc6vgEZ+Dzr8ENnjPzSa3F5apbyIkGR5v65aIlMpkoyy7lhlirWL1ka+j6ipsnsFcvdZ5gzijYmUBZBUpebTlpRGhT2ooZhUPjEJunY5e6vkH43J18NFE/iqOo=----ATTACHMENT:----NDU3OTk1MTUyNTc2NDQxMyA1NjQ3MzQxODI4Mzk0NTQ0IDcxMjM3Nzg0NjcwNzc1NjQ=