src/Autoloader.php
public function getClassLoaders(string $class)
    {
        $parts = explode("\\", $class);
        $result = array();
        $ref = &$this->root_namespace;
        $sub_ns = "";
        foreach ($parts as $part)
        {
            foreach ($ref['loaders'] as $loader)
                $result[] = $loader;

            if (!isset($ref['sub_ns'][$part]))
                break;

            $ref = &$ref['sub_ns'][$part];
        }

        // Reverse the result, because the last one is the most specific
        // namespace, which would be the one to try first.
        return array_reverse($result);
    }
public function getClassLoaders(string $class)
    {
        $parts = explode("\\", $class);
        $result = array();
        $ref = &$this->root_namespace;
        $sub_ns = "";
        foreach ($parts as $part)
        {
            foreach ($ref['loaders'] as $loader)
                $result[] = $loader;

            if (!isset($ref['sub_ns'][$part]))
                break;

            $ref = &$ref['sub_ns'][$part];
        }

        // Reverse the result, because the last one is the most specific
        // namespace, which would be the one to try first.
        return array_reverse($result);
    }
Get a list of class loaders that may be able to load the specified
class or namespace. The resulting list is ordered so that the most
specific class loader comes first and the most generic comes last.

@param string $class The fully qualified class (or namespace) to be loaded
@return array A list of loaders, each containing keys:
- 'path' where the classes are stored
- 'std' either Autoloader::PSR0, Autoloader::PSR4 or a callable to be used
delegate the autoload task to
- 'ns' the namespace this loader provides