src/PHPDish/Bundle/CoreBundle/Application/Plugin/DependencyInjection/Compiler/RegisterPluginPass.php
public function install($pluginMetadata)
    {
        ////注册插件服务
        if ($pluginMetadata['servicesSource'] !== false) {
            $loader = $this->createContainerLoader($this->container,
                new FileLocator($pluginMetadata['path'])
            );
            $loader->load($pluginMetadata['servicesSource']);
        }

        //注册路由
        if ($pluginMetadata['routerSource'] !== false) {
            $this->routingLoaderDefinition->addMethodCall('addResource', [
                $pluginMetadata['routerSource']
            ]);
        }
    }
public function install($pluginMetadata)
    {
        ////注册插件服务
        if ($pluginMetadata['servicesSource'] !== false) {
            $loader = $this->createContainerLoader($this->container,
                new FileLocator($pluginMetadata['path'])
            );
            $loader->load($pluginMetadata['servicesSource']);
        }

        //注册路由
        if ($pluginMetadata['routerSource'] !== false) {
            $this->routingLoaderDefinition->addMethodCall('addResource', [
                $pluginMetadata['routerSource']
            ]);
        }
    }
注册插件

@param array $pluginMetadata
@throws \Exception