public function loadSchema($path)
    {
        $schema = Utils::LoadJsonFromFile($path);

        $hook = function ($uri) {
            return $this->resolveRef($uri);
        };

        //this is the resolution of the $ref thingy with Jval classes
        //resolver can take a Closure parameter to change the $ref value
        $resolver = new Resolver();
        $resolver->setPreFetchHook($hook);
        $walker = new Walker(new Registry(), $resolver);
        $schema = $walker->resolveReferences($schema, new Uri(''));

        return $walker->parseSchema($schema, new Context());
    }
public function loadSchema($path)
    {
        $schema = Utils::LoadJsonFromFile($path);

        $hook = function ($uri) {
            return $this->resolveRef($uri);
        };

        //this is the resolution of the $ref thingy with Jval classes
        //resolver can take a Closure parameter to change the $ref value
        $resolver = new Resolver();
        $resolver->setPreFetchHook($hook);
        $walker = new Walker(new Registry(), $resolver);
        $schema = $walker->resolveReferences($schema, new Uri(''));

        return $walker->parseSchema($schema, new Context());
    }
public function loadSchema ( $ path ) { $ schema = Utils :: LoadJsonFromFile ( $ path ) ; $ hook = function ( $ uri ) { return $ this -> resolveRef ( $ uri ) ; } ; //this is the resolution of the $ref thingy with Jval classes //resolver can take a Closure parameter to change the $ref value $ resolver = new Resolver ( ) ; $ resolver -> setPreFetchHook ( $ hook ) ; $ walker = new Walker ( new Registry ( ) , $ resolver ) ; $ schema = $ walker -> resolveReferences ( $ schema , new Uri ( '' ) ) ; return $ walker -> parseSchema ( $ schema , new Context ( ) ) ; }
Loads a json schema.

@param string $path

@return \stdClass
Loads a json schema .