public function addComponent($area, GUIComponent $component) { switch ($area) { case GUIAreas::CONTENT: $this->content_area[$component->getName()] = $component->getHTML(); $this->addControlScriptsAndCss($component); break; case GUIAreas::CONTROL: $this->control_area[$component->getName()] = $component->getHTML(); $this->addControlScriptsAndCss($component); break; case GUIAreas::INFO: $this->info_area[$component->getName()] = $component->getHTML(); $this->addControlScriptsAndCss($component); break; case GUIAreas::LOGO: $this->logo_area[$component->getName()] = $component->getHTML(); $this->addControlScriptsAndCss($component); break; case GUIAreas::SEARCH: $this->search_area[$component->getName()] = $component->getHTML(); $this->addControlScriptsAndCss($component); break; case GUIAreas::FOOT: $this->footer_content[$component->getName()] = $component->getHTML(); $this->addControlScriptsAndCss($component); break; case GUIAreas::TOOLBAR: $this->toolbar_content[$component->getName()] = $component->getHTML(); $this->addControlScriptsAndCss($component); break; default: throw new Exception("Área inválida", "INVALID_AREA"); } }