protected function getPath($class)
    {
        foreach ($this->map as $prefix => $paths) {
            if (0 !== strpos($class, $prefix)) {
                continue;
            }

            foreach ($paths as $path) {
                $relative = ltrim(substr($class, strlen($prefix)), '\\');
                $relative = preg_replace('/\\\\+/', DIRECTORY_SEPARATOR, $relative);
                $relative .= '.php';

                if (file_exists($path . $relative)) {
                    return $path . $relative;
                }
            }
        }

        return null;
    }