public function addElement($title, $url = null) { $this->items[] = array('title' => (string) $title, 'url' => $url); }