AppserverIo\Appserver\Core\Api\DeploymentService::loadContainerInstances PHP Метод

loadContainerInstances() публичный Метод

Loads the containers, defined by the applications, merges them into the system configuration and returns the merged system configuration.
public loadContainerInstances ( ) : AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface
Результат AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface The merged system configuration
    public function loadContainerInstances()
    {
        // load the system configuration
        /** @var \AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface $systemConfiguration */
        $systemConfiguration = $this->getSystemConfiguration();
        // if applications are NOT allowed to override the system configuration
        if ($systemConfiguration->getAllowApplicationConfiguration() === false) {
            return $systemConfiguration;
        }
        /** @var \AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNodeInstance */
        foreach ($systemConfiguration->getContainers() as $containerNode) {
            // load the containers application base directory
            $containerAppBase = $this->getBaseDirectory($containerNode->getHost()->getAppBase());
            // iterate over all applications and create the server configuration
            foreach (glob($containerAppBase . '/*', GLOB_ONLYDIR) as $webappPath) {
                $this->loadContainerInstance($containerNode, $systemConfiguration, $webappPath);
            }
        }
        // returns the merged system configuration
        return $systemConfiguration;
    }