コード例 #1
0
ファイル: docbook.apidoc.php プロジェクト: dapepe/tymio
 public function parse_listing($xmlNode)
 {
     // If a the language attribute is specified, the syntaxhightligher brush class is used
     if ($xmlNode->hasAttribute('language')) {
         return '<pre class="brush: ' . $xmlNode->attribute('language') . '">' . $xmlNode->value() . '</pre>';
     } else {
         return '<div class="pre">' . str_replace(array('  ', "\t"), '&nbsp;&nbsp;', \Xily\Base::htmlEncode(rtrim(preg_replace('/^.*\\n/', '', $xmlNode->value(), 1)))) . '</div>';
     }
 }
コード例 #2
0
ファイル: docbook.core.php プロジェクト: dapepe/tymio
 /**
  * Set the include path for additional XML documents
  *
  * @param string $strPath
  * @return void
  */
 public function setIncludePath($strPath)
 {
     $this->strIncludePath = \Xily\Base::fileFormatDir($strPath);
 }