src/Leevel/Kernel/App.php
public function register($provider): Provider
    {
        if (is_string($provider)) {
            $provider = $this->makeProvider($provider);
        }

        if (method_exists($provider, 'register')) {
            $provider->register();
        }

        if ($this->isBootstrap()) {
            $this->callProviderBootstrap($provider);
        }

        return $provider;
    }
public function register($provider): Provider
    {
        if (is_string($provider)) {
            $provider = $this->makeProvider($provider);
        }

        if (method_exists($provider, 'register')) {
            $provider->register();
        }

        if ($this->isBootstrap()) {
            $this->callProviderBootstrap($provider);
        }

        return $provider;
    }
注册服务提供者.

@param \Leevel\Di\Provider|string $provider

@return \Leevel\Di\Provider