public function resolve($name, $declaringClass)
    {
        if (strpos($name, '\\') !== false) {
            return $name;
        }
        $imports = $this->cache->get('_PHX.imports.'.$declaringClass);
        if (!isset($imports)) {
            $imports = ClassHelper::getImports($declaringClass);
            $this->cache->save('_PHX.imports.'.$declaringClass, $imports);
        }
        if (isset($imports[$name])) {
            return $imports[$name];
        }
        $class = ClassHelper::getNamespaceName($declaringClass) . $name;
        if (class_exists($class)) {
            return $class;
        }
    }