src/Leevel/Option/Load.php
public function loadData(IApp $app): array
    {
        if ($this->loaded) {
            return $this->loaded;
        }

        $env = $this->loadEnvData($app);

        $composer = $this->loadComposerOption($app->path());

        $data = $this->loadOptionData();

        // 读取额外的配置
        if ($composer['options']) {
            $data = $this->mergeComposerOption($data, $app, $composer['options']);
        }

        // 环境变量
        $data['app']['_env'] = $env;

        // 延迟服务提供者
        $composer['providers'] = array_diff($composer['providers'], $composer['ignores']);
        $providers = $this->loadDeferredProviderData($composer['providers']);
        $data['app']['_deferred_providers'] = $providers;

        // composer 配置
        $data['app']['_composer'] = $composer;

        return $this->loaded = $data;
    }
public function loadData(IApp $app): array
    {
        if ($this->loaded) {
            return $this->loaded;
        }

        $env = $this->loadEnvData($app);

        $composer = $this->loadComposerOption($app->path());

        $data = $this->loadOptionData();

        // 读取额外的配置
        if ($composer['options']) {
            $data = $this->mergeComposerOption($data, $app, $composer['options']);
        }

        // 环境变量
        $data['app']['_env'] = $env;

        // 延迟服务提供者
        $composer['providers'] = array_diff($composer['providers'], $composer['ignores']);
        $providers = $this->loadDeferredProviderData($composer['providers']);
        $data['app']['_deferred_providers'] = $providers;

        // composer 配置
        $data['app']['_composer'] = $composer;

        return $this->loaded = $data;
    }
载入配置数据.

@param \Leevel\Kernel\IApp $app

@return array