public function resolveClassname($classname)
    {
        $path = $this->parseClassname($classname);

        // Check if the resource was found
        if (class_exists($path)) {
            return $path;
        }

        // If we are on the latest version, stop searching
        if ($this->isLatest()) {
            throw new Exceptions\ResourceNotFoundException($classname, $path);
        }

        // Search on the latest version
        $path = $this->parseClassname($classname, true);

        // If still does not exists, fail
        if (!class_exists($path)) {
            throw new Exceptions\ResourceNotFoundException($classname, $path);
        }

        return $path;
    }
public function resolveClassname($classname)
    {
        $path = $this->parseClassname($classname);

        // Check if the resource was found
        if (class_exists($path)) {
            return $path;
        }

        // If we are on the latest version, stop searching
        if ($this->isLatest()) {
            throw new Exceptions\ResourceNotFoundException($classname, $path);
        }

        // Search on the latest version
        $path = $this->parseClassname($classname, true);

        // If still does not exists, fail
        if (!class_exists($path)) {
            throw new Exceptions\ResourceNotFoundException($classname, $path);
        }

        return $path;
    }
public function resolveClassname ( $ classname ) { $ path = $ this -> parseClassname ( $ classname ) ; // Check if the resource was found if ( class_exists ( $ path ) ) { return $ path ; } // If we are on the latest version, stop searching if ( $ this -> isLatest ( ) ) { throw new Exceptions \ ResourceNotFoundException ( $ classname , $ path ) ; } // Search on the latest version $ path = $ this -> parseClassname ( $ classname , true ) ; // If still does not exists, fail if ( ! class_exists ( $ path ) ) { throw new Exceptions \ ResourceNotFoundException ( $ classname , $ path ) ; } return $ path ; }
Returns the classname of the versioned resource,
or it's latest version if it doesn't exist.

Throws an exception if it cannot find it.

@param string $classname

@return string
@throws ResourceNotFoundException
Returns the classname of the versioned resource or it s latest version if it doesn t exist .