src/Loader.php
public static function autoload($class)
    {
        if (substr($class, -4) == "View") {
            $class = substr($class, 0, -4);
        } elseif (substr($class, -5) == "Model") {
            $class = substr($class, 0, -5);
        } elseif (substr($class, -10) == "Controller") {
            $class = substr($class, 0, -10);
        } else {
            return false;
        }

        $directory = explode('/', str_replace('\\', '/', ltrim($class, '\\')));

        $class = array_pop($directory);
        $directory = array_merge($directory, explode('/', str_replace('_', '/', $class)));
        $class = array_pop($directory);
        $directory = rtrim(APP_DIR . join('/', $directory), '/');

        if (!empty($class)) {
            if (is_file($path = $directory . '/' . $class . '.php')) {
                return require_once $path;
            }

            throw new LoaderException('Couldn\'t locate ' . $class . '' . implode(', ', func_get_args()));
        }
    }
public static function autoload($class)
    {
        if (substr($class, -4) == "View") {
            $class = substr($class, 0, -4);
        } elseif (substr($class, -5) == "Model") {
            $class = substr($class, 0, -5);
        } elseif (substr($class, -10) == "Controller") {
            $class = substr($class, 0, -10);
        } else {
            return false;
        }

        $directory = explode('/', str_replace('\\', '/', ltrim($class, '\\')));

        $class = array_pop($directory);
        $directory = array_merge($directory, explode('/', str_replace('_', '/', $class)));
        $class = array_pop($directory);
        $directory = rtrim(APP_DIR . join('/', $directory), '/');

        if (!empty($class)) {
            if (is_file($path = $directory . '/' . $class . '.php')) {
                return require_once $path;
            }

            throw new LoaderException('Couldn\'t locate ' . $class . '' . implode(', ', func_get_args()));
        }
    }
@param $class

@return bool|mixed
@throws LoaderException