Beispiel #1
0
 /**
  *@param XMLFilenameProcessor $xmlfilename
  *@param string $path
  *@param string $strfilename
  *@return void
  *@desc 
  *PageXml Constructor. Empty page. and PageXml Constructor. Create from XML.
  *PageXml Constructor. Create from file name and path. Do not use with XmlnukeDB repository.
  */
 public function __construct($xmlfilename = null, $path = null, $strfilename = null)
 {
     if ($xmlfilename == null && $path == null && $strfilename == null) {
         $auxStr = "<page>\r\n" . "<meta>\r\n" . "<title/>\r\n" . "<abstract/>\r\n" . "<created>" . date("D M j Y G:i:s") . "</created>\r\n" . "<modified>" . date("D M j Y G:i:s") . "</modified>\r\n" . "<keyword>XMLSite ByJG</keyword>\r\n" . "<groupkeyword/>\r\n" . "</meta>\r\n" . "<group>\r\n" . "<id>__DEFAULT__</id>\r\n" . "<title/>\r\n" . "<keyword>all</keyword>\r\n" . "</group>\r\n" . "</page>";
         $this->_xmlDoc = XmlUtil::CreateXmlDocumentFromStr($auxStr);
         $xpath = new DOMXPath($this->_xmlDoc);
         $this->_nodePage = $this->_xmlDoc->getElementsByTagName("page")->item(0);
         $this->_nodeGroup = $xpath->query("/page/group")->item(0);
     } else {
         if ($xmlfilename != null && $path == null && $strfilename == null) {
             $this->_xmlDoc = $xmlfilename->getContext()->getXMLDataBase()->getDocument($xmlfilename->FullQualifiedName());
         } else {
             if ($xmlfilename == null && $path != null && $strfilename != null) {
                 $xmlDoc = XmlUtil::CreateXmlDocument();
                 $xmlDoc->Load(FileUtil::AdjustSlashes($path . FileUtil::Slash() . $strfilename));
             }
         }
     }
 }
Beispiel #2
0
 /**
  * @access public
  * @return string Return the phisical directory from xmlnuke.ROOTDIR param from Config.php file.
  */
 private function XmlNukePath()
 {
     if ($this->get("xmlnuke.USEABSOLUTEPATHSROOTDIR")) {
         return FileUtil::AdjustSlashes($this->_xmlnukepath) . FileUtil::Slash();
     } else {
         return realpath($this->_xmlnukepath) . FileUtil::Slash();
     }
 }