/** * Convert data to array * @return array */ public function toArray() { $parents = array(); foreach ($this->parents as $p) { $parents[] = (string) $p->getName(); } if ($this->controller) { $parents[] = (string) $this->controller->getName(); } if ($this->action) { $parents[] = (string) $this->action; } return $parents; }