protected function resolveNamespace(array $token_info, $classname)
    {
        // Resolve the namespace based on the use directive.
        if (isset($token_info['use'])
            && !empty($token_info['use'])
            && strpos($classname, DIRECTORY_SEPARATOR) === false) {
            foreach ($token_info['use'] as $use) {
                if (strpos($use, "\\{$classname}") === false) {
                    continue;
                }

                return $use;
            }
        }

        // Prefix the classname with the class namespace if defined.
        if (isset($token_info['namespace'])) {
            $classname = $token_info['namespace'] . "\\$classname";
        }

        return $classname;
    }
protected function resolveNamespace(array $token_info, $classname)
    {
        // Resolve the namespace based on the use directive.
        if (isset($token_info['use'])
            && !empty($token_info['use'])
            && strpos($classname, DIRECTORY_SEPARATOR) === false) {
            foreach ($token_info['use'] as $use) {
                if (strpos($use, "\\{$classname}") === false) {
                    continue;
                }

                return $use;
            }
        }

        // Prefix the classname with the class namespace if defined.
        if (isset($token_info['namespace'])) {
            $classname = $token_info['namespace'] . "\\$classname";
        }

        return $classname;
    }
protected function resolveNamespace ( array $ token_info , $ classname ) { // Resolve the namespace based on the use directive. if ( isset ( $ token_info [ 'use' ] ) && ! empty ( $ token_info [ 'use' ] ) && strpos ( $ classname , DIRECTORY_SEPARATOR ) === false ) { foreach ( $ token_info [ 'use' ] as $ use ) { if ( strpos ( $ use , "\\{$classname}" ) === false ) { continue ; } return $ use ; } } // Prefix the classname with the class namespace if defined. if ( isset ( $ token_info [ 'namespace' ] ) ) { $ classname = $ token_info [ 'namespace' ] . "\\$classname" ; } return $ classname ; }
Resolve the classname to it's fully qualified namespace.

@param array $info
The classname token information.
@param string $classname
The classname on which to resolve the FQN.

@return string
The fully qualified namespace for the given classname.
Resolve the classname to it s fully qualified namespace .