diff --git a/language/oop.xml b/language/oop.xml index c0253486e6..2d6cd27b12 100644 --- a/language/oop.xml +++ b/language/oop.xml @@ -1,5 +1,5 @@ - + Classes and Objects @@ -169,13 +169,13 @@ $cart->$myvar = array("10" => 1); Within a class definition, you do not know under which name the object will - be accessible in your program: At the time the Cart class was + be accessible in your program: at the time the Cart class was written, it was unknown that the object will be named $cart or $another_cart later. Thus, you cannot write $cart->items within the Cart class itself. Instead, in order to be able to access it's own functions and variables from within a class, one can use the pseudo-variable $this which can be read as 'my own' or - 'current object'. Thus, '$this->items[$artnr] += $num' can + 'current object'. Thus, '$this->items[$artnr] += $num' can be read as 'add $num to the $artnr counter of my own items array' or 'add $num to the $artnr counter of the items array within the current object'. @@ -675,7 +675,7 @@ page2.php: Conversely, unserialize checks for the presence of a function with the magic name __wakeup. If present, this function can - reconstruct any ressources that object may have. + reconstruct any resources that object may have.