public function resolve($type)
    {
        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Can not resolve class ident: type must be a string'
            );
        }

        $map = $this->map();
        if (isset($map[$type])) {
            $type = $map[$type];
        }

        if (class_exists($type)) {
            return $type;
        }

        $resolver = $this->resolver();
        $resolved = $resolver($type);
        return $resolved;
    }
public function resolve($type)
    {
        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Can not resolve class ident: type must be a string'
            );
        }

        $map = $this->map();
        if (isset($map[$type])) {
            $type = $map[$type];
        }

        if (class_exists($type)) {
            return $type;
        }

        $resolver = $this->resolver();
        $resolved = $resolver($type);
        return $resolved;
    }
public function resolve ( $ type ) { if ( ! is_string ( $ type ) ) { throw new InvalidArgumentException ( 'Can not resolve class ident: type must be a string' ) ; } $ map = $ this -> map ( ) ; if ( isset ( $ map [ $ type ] ) ) { $ type = $ map [ $ type ] ; } if ( class_exists ( $ type ) ) { return $ type ; } $ resolver = $ this -> resolver ( ) ; $ resolved = $ resolver ( $ type ) ; return $ resolved ; }
The Generic factory resolves the class name from an exact FQN.

@param string $type The "type" of object to resolve (the object ident).
@throws InvalidArgumentException If the type parameter is not a string.
@return string The resolved class name (FQN).
The Generic factory resolves the class name from an exact FQN .