protected function loadFont($name, $type)
    {
        if (file_exists($name)) {
            return $name;
        }

        $path = sprintf('%s/%s/%s', $this->resourcePath, $type, $name);
        if (file_exists($path)) {
            return $path;
        }

        throw new Exception(
            sprintf('The requested resource %s (%s) has not been found!', $name, $type)
        );
    }
protected function loadFont($name, $type)
    {
        if (file_exists($name)) {
            return $name;
        }

        $path = sprintf('%s/%s/%s', $this->resourcePath, $type, $name);
        if (file_exists($path)) {
            return $path;
        }

        throw new Exception(
            sprintf('The requested resource %s (%s) has not been found!', $name, $type)
        );
    }
protected function loadFont ( $ name , $ type ) { if ( file_exists ( $ name ) ) { return $ name ; } $ path = sprintf ( '%s/%s/%s' , $ this -> resourcePath , $ type , $ name ) ; if ( file_exists ( $ path ) ) { return $ path ; } throw new Exception ( sprintf ( 'The requested resource %s (%s) has not been found!' , $ name , $ type ) ) ; }
Check if requested resource exists and return the path to it if yes.
@param string $name
@param string $type
@return string
@throws Exception
Check if requested resource exists and return the path to it if yes .