getLayoutPath($layout_name); // 해당 레이아웃의 정보를 구함 $info = $this->getLayoutInfoXml($layout_name); unset($obj); $info->layout = $layout_name; $info->path = $path; $list[] = $info; } return $list; } /** * @brief 모듈의 conf/info.xml 을 읽어서 정보를 구함 **/ function getLayoutInfoXml($layout) { // 요청된 모듈의 경로를 구한다. 없으면 return $layout_path = $this->getLayoutPath($layout); if(!$layout_path) return; // 현재 선택된 모듈의 스킨의 정보 xml 파일을 읽음 $xml_file = sprintf("%sconf/info.xml", $layout_path); if(!file_exists($xml_file)) return; $oXmlParser = new XmlParser(); $tmp_xml_obj = $oXmlParser->loadXmlFile($xml_file); $xml_obj = $tmp_xml_obj->layout; if(!$xml_obj) return; $info->title = $xml_obj->title->body; // 작성자 정보 $layout_info->title = $xml_obj->title->body; $layout_info->version = $xml_obj->attrs->version; $layout_info->author->name = $xml_obj->author->name->body; $layout_info->author->email_address = $xml_obj->author->attrs->email_address; $layout_info->author->homepage = $xml_obj->author->attrs->link; $layout_info->author->date = $xml_obj->author->attrs->date; $layout_info->author->description = $xml_obj->author->description->body; // history if(!is_array($xml_obj->history->author)) $history[] = $xml_obj->history->author; else $history = $xml_obj->history->author; foreach($history as $item) { unset($obj); $obj->name = $item->name->body; $obj->email_address = $item->attrs->email_address; $obj->homepage = $item->attrs->link; $obj->date = $item->attrs->date; $obj->description = $item->description->body; $layout_info->history[] = $obj; } // navigations if(!is_array($xml_obj->navigations->navigation)) $navigations[] = $xml_obj->navigations->navigation; else $navigations = $xml_obj->navigations->navigation; unset($item); foreach($navigations as $item) { unset($obj); $obj->id = $item->attrs->id; $obj->name = $item->name->body; $obj->maxdepth = $item->maxdepth->body; $layout_info->navigations[] = $obj; } return $layout_info; } } ?>