← Back to team overview

anewt-developers team mailing list archive

[Branch ~uws/anewt/anewt.uws] Rev 1797: [xml/dom] Move __toString() to Node, not Element

 

------------------------------------------------------------
revno: 1797
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt
timestamp: Tue 2010-10-05 23:17:04 +0200
message:
  [xml/dom] Move __toString() to Node, not Element
  
  This prevented text and raw nodes from being casted to
  strings.
modified:
  xml/dom.lib.php


--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws

Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription
=== modified file 'xml/dom.lib.php'
--- xml/dom.lib.php	2010-02-16 19:12:28 +0000
+++ xml/dom.lib.php	2010-10-05 21:17:04 +0000
@@ -487,6 +487,16 @@
 	}
 
 	/** \} */
+
+	/**
+	 * Render this node to a string.
+	 *
+	 * \see render
+	 */
+	public function __toString()
+	{
+		return $this->render();
+	}
 }
 
 
@@ -1317,16 +1327,6 @@
 		/* Final output */
 		return join('', $out);
 	}
-
-	/**
-	 * Render this element to a string.
-	 *
-	 * \see render
-	 */
-	public function __toString()
-	{
-		return $this->render();
-	}
 }