protected function _containerHasPath($container, $path)
    {
        $originalPath = $path;
        $path         = $this->_normalizeArray($path);
        $pathLength   = count($path);

        if (!$pathLength) {
            throw $this->_createInvalidArgumentException($this->__('Not a valid path'), null, null, $originalPath);
        }

        $lastSegment = $path[$pathLength - 1];
        $service     = $container;

        foreach ($path as $segment) {
            $hasSegment = $this->_containerHas($service, $segment);
            if (!$hasSegment) {
                return false;
            } elseif ($segment !== $lastSegment) {
                $service = $this->_containerGet($service, $segment);
            }
        }

        return true;
    }