public function offsetSet($offset, $Page) { if (!$Page instanceof \Gumdrop\Page) { throw new Exception('Expecting an instance of \\Gumdrop\\Page'); } if (is_null($offset)) { $offset = count($this->Pages); } $this->Pages[$offset] = $Page; }