public function addPages($pages)
        {
            if ($pages instanceof Container) {
                $pages = iterator_to_array($pages);
            }

            if (!is_array($pages)) {
                throw new Exception('Invalid argument: $pages must be an array, an instance of Container');
            }

            foreach ($pages as $page) {
                $this->addPage($page);
            }

            return $this;
        }