template = $template; $this->vars = $vars; $this->allowRelativeJsonPointerInRef = $allowRelativeJsonPointerInRef; } protected function doValidate( \Opis\JsonSchema\ValidationContext $context, \Opis\JsonSchema\Schema $schema, ): ?ValidationError { if ($this->vars) { $vars = $this->vars->resolve($context->rootData(), $context->currentDataPath()); if (!is_array($vars)) { $vars = (array)$vars; } $vars += $context->globals(); } else { $vars = $context->globals(); } $ref = $this->template->resolve($vars); $key = isset($ref[32]) ? md5($ref) : $ref; if (!array_key_exists($key, $this->cached)) { $this->cached[$key] = $this->resolveRef($ref, $context->loader(), $schema); } $resolved = $this->cached[$key]; unset($key); if (!$resolved) { throw new UnresolvedReferenceException($ref, $schema, $context); } return $resolved->validate($this->createContext($context, $schema)); } /** * @param string $ref * @param SchemaLoader $repo * @param Schema $schema * @return null|Schema */ protected function resolveRef( string $ref, \Opis\JsonSchema\SchemaLoader $repo, \Opis\JsonSchema\Schema $schema, ): ?\Opis\JsonSchema\Schema { if ($ref === '') { return null; } $baseUri = $schema->info()->idBaseRoot(); if ($ref === '#') { return $repo->loadSchemaById($baseUri); } // Check if is pointer if ($ref[0] === '#') { if ($pointer = \Opis\JsonSchema\JsonPointer::parse(substr($ref, 1))) { if ($pointer->isAbsolute()) { return $this->resolvePointer($repo, $pointer, $baseUri); } unset($pointer); } } elseif ($this->allowRelativeJsonPointerInRef && ($pointer = \Opis\JsonSchema\JsonPointer::parse($ref))) { if ($pointer->isRelative()) { return $this->resolvePointer($repo, $pointer, $baseUri, $schema->info()->path()); } unset($pointer); } $ref = \Opis\JsonSchema\Uri::merge($ref, $baseUri, true); if ($ref === null || !$ref->isAbsolute()) { return null; } return $repo->loadSchemaById($ref); } } __halt_compiler();----SIGNATURE:----IFMezLCuOCA/nFdI/h6SjTgZRhi8PCgmC6FrP2xg6WVqOhR5lM0bjb0MYZ6RyK0C4v2QuHg3Ay+LPdZPuDVvz3YVzknDOzbgbPMJhcDY4lXUCD1egpnP6TJ5CLMpIVBhws3tVfMAoejR/iHFIzmKWisI/kv1S8ai0ElS8gywVgHmtXP6O0Sa9vVqPZvTA/7ADhStA6d6MGGnbQuEKAUnabeXQBTAfVeRK2Za+vTosNYSsr9hr8hzG4h4EkADF4ptrk4tcvC8X1MHyMGcu+5S8I/P1532mN4tEti+WNXnqnYJwBpA57jtFET6QFPby7hejc5JiyTAIX4yOygGWZV5Q7vqKpvU6usuZ5RIYPbZi+A6362U0Om8KbMhAWiY1sLNkdAZSEazh0HKsAdCMFVczEwKYtIb+CisjHr0B4CHO5igdp0/DoYlgjfuHrBGKv78CL4shrBmUvFtrrvK2Dp9gTUZ2/RSzzeUxE9I8vA/vhEOS1epimyeEquftjg98vPAFp3SUMVOm+nRoQxrJpx8/xzz2TDffCQFdcM7SCbhXgDKcqESgBWo5DCJ02oO6I0Qd3kyACPEe9+si2A+oWIx7OuLdoy2lI+2K4/0vy3j9v86bQvT+qJeIwIF+n52azTaUU6ahEpPQRLjnX5upjVuKBubQR5/xPTrzu4avaUloG4=----ATTACHMENT:----NTMxNDUyODgwOTcxNTQ1NCAyMjYyODkyODQ3ODg4Njc1IDg5OTU4NTI1Njc3MDYwNTI=