src/ContainerGetPathCapableTrait.php
protected function _containerGetPath($container, $path)
    {
        $path = $this->_normalizeIterable($path);

        $service = $container;

        foreach ($path as $segment) {
            $service = $this->_containerGet($service, $segment);
        }

        return $service;
    }
protected function _containerGetPath($container, $path)
    {
        $path = $this->_normalizeIterable($path);

        $service = $container;

        foreach ($path as $segment) {
            $service = $this->_containerGet($service, $segment);
        }

        return $service;
    }
protected function _containerGetPath ( $ container , $ path ) { $ path = $ this -> _normalizeIterable ( $ path ) ; $ service = $ container ; foreach ( $ path as $ segment ) { $ service = $ this -> _containerGet ( $ service , $ segment ) ; } return $ service ; }
Retrieves a value from a chain of nested containers by path.

@since [*next-version*]

@param array|ArrayAccess|stdClass|BaseContainerInterface $container The top container in the chain to read from.
@param array|Traversable|stdClass                        $path      The list of path segments.

@throws InvalidArgumentException    If one of the containers in the chain is invalid.
@throws ContainerExceptionInterface If an error occurred while reading from one of the containers in the chain.
@throws NotFoundExceptionInterface  If one of the containers in the chain does not have the corresponding key.

@return mixed The value at the specified path.
Retrieves a value from a chain of nested containers by path .