cvs: phd /include PhDReader.class.php
| From: | Christian Weiske | Date: | Sat, 08 Nov 2008 08:40:57 +0000 |
| Subject: | cvs: phd /include PhDReader.class.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2483@lists.php.net to get a copy of this message | ||
cweiske Sat Nov 8 08:40:57 2008 UTC
Modified files:
/phd/include PhDReader.class.php
Log:
Do not only allow chunking normally unchunked elements but make it possible
to not chunk normally chunked elements
http://cvs.php.net/viewvc.cgi/phd/include/PhDReader.class.php?r1=1.21&r2=1.22&diff_format=u
Index: phd/include/PhDReader.class.php
diff -u phd/include/PhDReader.class.php:1.21 phd/include/PhDReader.class.php:1.22
--- phd/include/PhDReader.class.php:1.21 Thu Oct 30 17:53:51 2008
+++ phd/include/PhDReader.class.php Sat Nov 8 08:40:57 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: PhDReader.class.php,v 1.21 2008/10/30 17:53:51 cweiske Exp $ */
+/* $Id: PhDReader.class.php,v 1.22 2008/11/08 08:40:57 cweiske Exp $ */
//6271
class PhDReader extends XMLReader {
@@ -113,7 +113,8 @@
* Check if the element wants to be chunked.
* Reads the element's 'phd:chunk="true"' attribute
*
- * @return boolean true if the element shall be chunked
+ * @return boolean true if the element shall be chunked, false if not,
+ null if there has no decision made
*/
public function getWantsToBeChunked() { /* {{{ */
if ($this->hasAttributes && XMLReader::moveToAttributeNs("chunk",
self::XMLNS_PHD)) {
@@ -121,7 +122,7 @@
XMLReader::moveToElement();
return $isChunk;
}
- return false;
+ return null;
} /* }}} */
public function getParentTagName() { /* {{{ */
@@ -220,8 +221,8 @@
public function isChunk($tag, $id) { /* {{{ */
if (!$id) {
return false;
- } else if ($this->getWantsToBeChunked()) {
- return true;
+ } else if (null !== $isChunk = $this->getWantsToBeChunked()) {
+ return $isChunk;
} else if (isset($this->CHUNK_ME[$tag])) {
$isChunk = $this->CHUNK_ME[$tag];
if (is_array($isChunk)) {