protected function _t_loader_namespacestack_getMatchedFromStack($name, $recursivelyNamespaceStack = null)
    {
        $matched = array();
        if (empty($recursivelyNamespaceStack) && $recursivelyNamespaceStack !== null)
            ## list is empty
            return $matched;

        if ($this->_t_loader_namespacestack_cache_SortNamespaces !== $this->_t_loader_namespacestack_Namespaces) {
            // case-insensitive sort
            uksort($this->_t_loader_namespacestack_Namespaces, 'strcasecmp');
            $this->_t_loader_namespacestack_cache_SortNamespaces = $this->_t_loader_namespacestack_Namespaces;
        }

        // find best namespace match and list in queue:
        ## it will reduce filesystem actions to find class

        $recursivelyNamespaceStack = ($recursivelyNamespaceStack === null)
            ? $this->_t_loader_namespacestack_Namespaces
            : $recursivelyNamespaceStack;

        $keys = array_keys($recursivelyNamespaceStack);

        ## grab the middle
        $midKey  = intval(count($keys) / 2);
        $curRegisteredName = trim($keys[$midKey], \Poirot\Loader\SEPARATOR_NAMESPACES);

        if ($curRegisteredName == '*' || $curRegisteredName == '**')
            return $matched;

        $term = strncasecmp($curRegisteredName, $name, strlen($curRegisteredName));
        if ($term === 0) {
            ## match resource in stack
            array_push($matched, $curRegisteredName);

            ## looking fore next and previous keys to match

            for($i = $midKey-1; $i >=0; $i--) {
                ### previous
                $curRegisteredName = trim($keys[$i], \Poirot\Loader\SEPARATOR_NAMESPACES);
                $term    = strncasecmp($curRegisteredName, $name, strlen($curRegisteredName));
                if ($term !== 0)
                    break;

                ### only match for keys that contains resource name
                array_push($matched, $curRegisteredName);
            }

            for($i = $midKey+1; $i < count($keys); $i++) {
                ### next
                $curRegisteredName = trim($keys[$i], \Poirot\Loader\SEPARATOR_NAMESPACES);
                $term    = strncasecmp($curRegisteredName, $name, strlen($curRegisteredName));
                if ($term !== 0)
                    break;

                ### only match for keys that contains resource name
                array_unshift($matched, $curRegisteredName); ### nearest to namespace
            }

            return $matched;
        }

        ## Its Less Than Current Name. e.g. Poirot\Auth < Poirot\Loader
        if ($term > 0)
            return $this->_t_loader_namespacestack_getMatchedFromStack(
                $name
                , array_splice($recursivelyNamespaceStack, 0, $midKey)
            );

        // if ($term < 0)
        ## Its Greater Than Current Name. e.g. Poirot\Std > Poirot\Loader
        $matched = $this->_t_loader_namespacestack_getMatchedFromStack(
            $name
            , array_splice($recursivelyNamespaceStack, $midKey, count($keys)-1)
        );

        if (!$matched) {
            ## looking from top of stack the namespace part may match
            /* In case of Poirot\Std that must match
             * 'Poirot' => __DIR__,  <--- Here -----
             * 'Poirot\\Loader' => __DIR__.'/Loader',  <--- we first pick this from list
             * .... Part 2
             * 'Poirot\\Loader\\LoaderNamespaceStack' => __DIR__.'/Loader/LoaderNamespaceStack.php',
             *
             * Std is greater So Looking in Part 2 but not match here
             * but maybe found in the top of the list
             */
            foreach($keys as $canMatch) {
                if(0 === strncasecmp($canMatch, $name, strlen($canMatch)))
                    array_push($matched, $canMatch);
                else
                    ## match can't be found because array is sorted array
                    break;
            }
        }

        return $matched;
    }