AppserverIo\Appserver\Core\Api\Node\AppserverNode::getContainer PHP Method

getContainer() public method

Returns the container with the passed name.
public getContainer ( string $name ) : AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface
$name string The name of the container to return
return AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container node matching the passed name
    public function getContainer($name)
    {
        // try to match one of the container names with the passed name
        /** @var \AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $container */
        foreach ($this->getContainers() as $container) {
            if (fnmatch($name, $container->getName())) {
                return $container;
            }
        }
    }