protected function _normalizeContainer($container)
    {
        if (!($container instanceof BaseContainerInterface) &&
            !($container instanceof stdClass) &&
            !($container instanceof ArrayAccess) &&
            !is_array($container)
        ) {
            throw $this->_createInvalidArgumentException(
                $this->__('Invalid container'),
                null,
                null,
                $container
            );
        }

        return $container;
    }