cvs: phd / build.php /include PhDReader.class.php
| From: | Hannes Magnusson | Date: | Sun, 30 Dec 2007 13:49:09 +0000 |
| Subject: | cvs: phd / build.php /include PhDReader.class.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-931@lists.php.net to get a copy of this message | ||
bjori Sun Dec 30 13:49:09 2007 UTC
Modified files:
/phd build.php
/phd/include PhDReader.class.php
Log:
Add support for previous siblings to the $props array
http://cvs.php.net/viewvc.cgi/phd/build.php?r1=1.38&r2=1.39&diff_format=u
Index: phd/build.php
diff -u phd/build.php:1.38 phd/build.php:1.39
--- phd/build.php:1.38 Sun Nov 25 20:29:30 2007
+++ phd/build.php Sun Dec 30 13:49:09 2007
@@ -1,6 +1,6 @@
#!@php_bin@
<?php
-/* $Id: build.php,v 1.38 2007/11/25 20:29:30 bjori Exp $ */
+/* $Id: build.php,v 1.39 2007/12/30 13:49:09 bjori Exp $ */
function err($no, $str, $file, $line) {
global $notify;
@@ -144,9 +144,9 @@
$props = array(
"empty" => $reader->isEmptyElement,
"isChunk" => $isChunk,
- /* These two are not used at the moment */
"lang" => $reader->xmlLang,
"ns" => $reader->namespaceURI,
+ "sibling" => $reader->getPreviousSiblingTagName(),
);
$skip = array();
@@ -165,6 +165,7 @@
}
continue;
}
+
$funcname = $tag;
$retval = $themes[$theme]->{$funcname}($open, $nodename, $attrs,
$props);
if ($retval !== false) {
http://cvs.php.net/viewvc.cgi/phd/include/PhDReader.class.php?r1=1.12&r2=1.13&diff_format=u
Index: phd/include/PhDReader.class.php
diff -u phd/include/PhDReader.class.php:1.12 phd/include/PhDReader.class.php:1.13
--- phd/include/PhDReader.class.php:1.12 Sun Oct 21 17:08:44 2007
+++ phd/include/PhDReader.class.php Sun Dec 30 13:49:09 2007
@@ -1,5 +1,5 @@
<?php
-/* $Id: PhDReader.class.php,v 1.12 2007/10/21 17:08:44 bjori Exp $ */
+/* $Id: PhDReader.class.php,v 1.13 2007/12/30 13:49:09 bjori Exp $ */
//6271
class PhDReader extends XMLReader {
@@ -13,6 +13,7 @@
private $STACK = array();
private $LAST_DEPTH = -1;
private $lastChunkDepth = -1;
+ private $PREVIOUS_SIBLING = "";
public $isChunk = false;
@@ -107,6 +108,10 @@
public function getParentTagName() {
return $this->STACK[$this->depth-1];
}
+ public function getPreviousSiblingTagName() {
+ return $this->PREVIOUS_SIBLING;
+ }
+
public function read() {
$this->isChunk = false;
if(XMLReader::read()) {