aidan Wed Sep 29 11:51:49 2004 EDT
Modified files:
/phpdoc/en/language/oop5 overloading.xml
Log:
whitespace changes
http://cvs.php.net/diff.php/phpdoc/en/language/oop5/overloading.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/language/oop5/overloading.xml
diff -u phpdoc/en/language/oop5/overloading.xml:1.4
phpdoc/en/language/oop5/overloading.xml:1.5
--- phpdoc/en/language/oop5/overloading.xml:1.4 Mon Aug 30 07:39:24 2004
+++ phpdoc/en/language/oop5/overloading.xml Wed Sep 29 11:51:49 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<sect1 id="language.oop5.overloading">
<title>Overloading</title>
@@ -37,31 +37,31 @@
<![CDATA[
<?php
class Setter {
- public $n;
- private $x = array("a" => 1, "b" => 2, "c" => 3);
+ public $n;
+ private $x = array("a" => 1, "b" => 2, "c" => 3);
- function __get($nm) {
- print "Getting [$nm]\n";
+ function __get($nm) {
+ print "Getting [$nm]\n";
- if (isset($this->x[$nm])) {
- $r = $this->x[$nm];
- print "Returning: $r\n";
- return $r;
- } else {
- print "Nothing!\n";
+ if (isset($this->x[$nm])) {
+ $r = $this->x[$nm];
+ print "Returning: $r\n";
+ return $r;
+ } else {
+ echo "Nothing!\n";
+ }
}
- }
- function __set($nm, $val) {
- print "Setting [$nm] to $val\n";
+ function __set($nm, $val) {
+ print "Setting [$nm] to $val\n";
- if (isset($this->x[$nm])) {
- $this->x[$nm] = $val;
- print "OK!\n";
- } else {
- print "Not OK!\n";
+ if (isset($this->x[$nm])) {
+ $this->x[$nm] = $val;
+ echo "OK!\n";
+ } else {
+ echo "Not OK!\n";
+ }
}
- }
}
$foo = new Setter();
@@ -89,17 +89,17 @@
Setting [z] to 1
Not OK!
object(Setter)#1 (2) {
- ["n"]=>
- int(1)
- ["x:private"]=>
- array(3) {
- ["a"]=>
- int(101)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- }
+ ["n"]=>
+ int(1)
+ ["x:private"]=>
+ array(3) {
+ ["a"]=>
+ int(101)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+ }
}
]]>
</screen>
@@ -132,13 +132,13 @@
<![CDATA[
<?php
class Caller {
- private $x = array(1, 2, 3);
+ private $x = array(1, 2, 3);
- function __call($m, $a) {
- print "Method $m called:\n";
- var_dump($a);
- return $this->x;
- }
+ function __call($m, $a) {
+ print "Method $m called:\n";
+ var_dump($a);
+ return $this->x;
+ }
}
$foo = new Caller();
@@ -155,22 +155,22 @@
Method test called:
array(4) {
- [0]=>
- int(1)
- [1]=>
- string(1) "2"
- [2]=>
- float(3.4)
- [3]=>
- bool(true)
+ [0]=>
+ int(1)
+ [1]=>
+ string(1) "2"
+ [2]=>
+ float(3.4)
+ [3]=>
+ bool(true)
}
array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
}
]]>
</screen>