/** * Metodo responsavel por criar o array de objetos ActionMapping * @return : void */ private function createActionsMappings() { $actionsList = $this->_document->getElementsByTagName('action'); foreach ($actionsList as $action) { $actionMapping = new ActionMapping(); if ($action->hasAttribute("ssl")) { if ($action->getAttribute("ssl") == "false") { $actionMapping->setSSL(0); } else { $actionMapping->setSSL(1); } } if ($action->hasAttribute("authentication")) { if ($action->getAttribute("authentication") == "false") { $actionMapping->setAuthentication(0); } else { $actionMapping->setAuthentication(1); } } if ($action->hasChildNodes()) { $actionChildNode = $action->childNodes; foreach ($actionChildNode as $actionChild) { if ($actionChild->nodeName == "name") { $actionMapping->setName($actionChild->nodeValue); } if ($actionChild->nodeName == "type") { $actionMapping->setType($actionChild->nodeValue); } if ($actionChild->nodeName == "role") { $actionMapping->setRole($actionChild->nodeValue); } if ($actionChild->nodeName == "forwards") { $actionMapping->setForwards($this->createForwards($actionChild)); } if ($actionChild->nodeName == "validation") { $actionMapping->setValidations($this->createValidation($actionChild)); } } $this->_actionsMapping[] = $actionMapping; } } }