src/Extension/MessageExtension.php
public function initServiceExtensions()
    {
        $tmpExtensions = [];

        foreach ($this->serviceExtensions as $serviceExtensions) {
            $extension = new $serviceExtensions();

            $tmpExtensions[] = $extension->init();

            $this->baseExtensions = array_merge($this->baseExtensions, $extension->baseExtensions);
        }

        $this->serviceExtensions = $tmpExtensions;
        $this->baseExtensions = array_unique($this->baseExtensions);

        $this->initBaseExtensions();
    }
public function initServiceExtensions()
    {
        $tmpExtensions = [];

        foreach ($this->serviceExtensions as $serviceExtensions) {
            $extension = new $serviceExtensions();

            $tmpExtensions[] = $extension->init();

            $this->baseExtensions = array_merge($this->baseExtensions, $extension->baseExtensions);
        }

        $this->serviceExtensions = $tmpExtensions;
        $this->baseExtensions = array_unique($this->baseExtensions);

        $this->initBaseExtensions();
    }
初始化业务拓展.