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:----f9chtp38hcI7XVlJWNiaeV5wftl4bH9dnDOPF5lNVvp0x7N6FVNGabb76I3e8AYF6vfrZp3kKxy2jIuBns5eEkxne1cqIrsSoLRRWc36zvPWbungbhmbK5gMP1Suy2cOObEXE/DPnIDRulFcGcvbI+Ob8NcoO5VgPIWBprfZ6uyG73sICvxau++3UkTIUvBfpQq/Aya2SWZzmQtd7/xhRTJBKZ4J22hCMBkhOfPpS41EHxwcSQCurE9kZ/cJs7nY+iEstny/3R4/89E0FqL4dWvH+cSPIPdHlAaDWgsZVHSQjS2/QoE0XxDI3rkfJlNDZY98Hwbw6T+NaKhURlvupWHjOcS/egIj5SwLWqneTYTz+MpcAkKtZVnhsTILbs5pjci73+YVffych3BWuP1zfL8RnxTGsrHZI6JtsCksQTMC1cNdWl/ncyfUPv+T1q83Tz9uL+Mcgb8AAWXivjO3HnE9VW+OjW5GV5jIFOITaVDILXw3bvrqsOFtCyCPuo3tg9FoAyCzTyt0OiPbxF4jxSjxX01ZRx60mDwA0bk0xTgiL7cYkoMR9StPvwUOozra9qFvyC4uVpE3DyES7a4LEK7qxTtc5UDxfTKLgNo1TKxXd+1r3LIr3UxKeOlYXARaghT3vuxEauobDdQjVdljngr6yltW6iNN1q7WxUwrwDM=----ATTACHMENT:----MzYwMzk1MTY3MzA5NTc4NCA2MDM3NzIwNDM0NzM2MTc0IDk3OTgxOTI0NTcyNjg1NTI=