src/Core/Loader.php
private function loadClass($class_name)
    {
        $prefix = '';
        $pos = strpos($class_name, '\\');
        if (false !== $pos) {
            $prefix = substr($class_name, 0, $pos);
            $class_name = str_replace('\\', DIRECTORY_SEPARATOR, $class_name);
        }

        $check_file_exists = true;
        if ('' !== $prefix && 0 === strcasecmp($prefix, 'cross')) {
            $check_file_exists = false;
            $class_file = CP_PATH . substr($class_name, $pos + 1) . '.php';
        } else {
            $class_file = PROJECT_REAL_PATH . $class_name . '.php';
        }

        $this->requireFile($class_file, false, $check_file_exists);
        return $class_file;
    }
private function loadClass($class_name)
    {
        $prefix = '';
        $pos = strpos($class_name, '\\');
        if (false !== $pos) {
            $prefix = substr($class_name, 0, $pos);
            $class_name = str_replace('\\', DIRECTORY_SEPARATOR, $class_name);
        }

        $check_file_exists = true;
        if ('' !== $prefix && 0 === strcasecmp($prefix, 'cross')) {
            $check_file_exists = false;
            $class_file = CP_PATH . substr($class_name, $pos + 1) . '.php';
        } else {
            $class_file = PROJECT_REAL_PATH . $class_name . '.php';
        }

        $this->requireFile($class_file, false, $check_file_exists);
        return $class_file;
    }
自动加载

@param string $class_name
@return bool|string
@throws CoreException