Example #1
0
 public static function __callStatic($method, $options)
 {
     $content = $options[0];
     $tag = $options[1];
     // get include information
     $nodes = $content->XPath("//include");
     // include all page informations
     if (count($nodes)) {
         foreach ($nodes as $node) {
             $page = OLIVPage::_load((string) $node);
             olivxml_insert($content, $page->content);
         }
     }
     return $content;
 }
Example #2
0
 public static function getTitle($id)
 {
     return OLIVPage::getPageInfo($id)->define->name;
 }
Example #3
0
 private static function updatePageXml($url)
 {
     // get page information xml
     $pageInfo = OLIVPage::getPageInfo($url);
     // page exists => write pageInfo in page.xml
     if ($pageInfo) {
         $pageXml = sessionxml_load_file(system::OLIV_PAGE_PATH() . "page.xml");
         // insert if url don't exist
         if (!$pageXml->define->{$url}) {
             olivxml_insert($pageXml->define->{$url}, $pageInfo->define);
             // write file back to disk
             $pageXml->asXML(session_path(system::OLIV_PAGE_PATH() . "page.xml"));
         }
         return $pageInfo;
     }
 }