             if matches = line.match(regex)
                 isValid = matches[1].split('\\').map(
                     (item) ->
-                        item.split(';')[0].split(' as ')[0] == objectType
+                        l = item.split(';')[0].split(' as ')
+                        if l.length == 1
+                            l[0] == objectType
+                        else if l.length == 2
+                            l[0] == objectType or l[1] == objectType
+
                 ).filter(
                     (item) -> item == true
                 )
-                console.log isValid, objectType, matches[1].match(objectType)
+                # console.log isValid, objectType, matches[1].match(objectType)
                 if isValid.length > 0
                     return @fetchAndResolveDependencies(matches[1].match(objectType),prefix,resolve)
 

                fullMethodString = inline.reverse().reduce (previous,current) ->
                    previous.trim()+current.trim()

                return fullMethodString.match(fullMethodRegex)[0]

         return ''


        script = @getScript()
        autoload = @getAutoloadPath()

        # console.log namespace, script, autoload

        process = proc.spawn "php", [script, autoload, namespace]

