public function translate($uri)
    {
        foreach ($this->translationMap as $from => $to) {
            $uri = preg_replace($from, $to, $uri);
        }

        // translate references to local files within the json-schema package
        $uri = preg_replace('|^package://|', sprintf('file://%s/', realpath(__DIR__ . '/../../..')), $uri);

        return $uri;
    }
public function translate($uri)
    {
        foreach ($this->translationMap as $from => $to) {
            $uri = preg_replace($from, $to, $uri);
        }

        // translate references to local files within the json-schema package
        $uri = preg_replace('|^package://|', sprintf('file://%s/', realpath(__DIR__ . '/../../..')), $uri);

        return $uri;
    }
public function translate ( $ uri ) { foreach ( $ this -> translationMap as $ from => $ to ) { $ uri = preg_replace ( $ from , $ to , $ uri ) ; } // translate references to local files within the json-schema package $ uri = preg_replace ( '|^package://|' , sprintf ( 'file://%s/' , realpath ( __DIR__ . '/../../..' ) ) , $ uri ) ; return $ uri ; }
Apply URI translation rules
Apply URI translation rules