AppserverIo\Appserver\Core\Api\Node\AppserverNode::getContainersAsArray PHP Метод

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

Returns the containers as array with the container name as key.
public getContainersAsArray ( ) : array
Результат array The array with the containers
    public function getContainersAsArray()
    {
        // initialize the array for the containers
        $containers = array();
        // iterate over all found containers and assemble the array
        /** @var \AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $container */
        foreach ($this->getContainers() as $container) {
            $containers[$container->getName()] = $container;
        }
        // return the array with the containers
        return $containers;
    }