diff --git a/reference/objaggregation/examples.xml b/reference/objaggregation/examples.xml index aa61eebe3a..e6147647fc 100644 --- a/reference/objaggregation/examples.xml +++ b/reference/objaggregation/examples.xml @@ -1,5 +1,5 @@ - + &reftitle.examples; @@ -16,9 +16,9 @@ _dt = new DateTime(); + $this->_dt = new MyDateTime(); // initialization code ... } @@ -62,14 +62,14 @@ $rep = new Report(); _format = $format; } @@ -81,7 +81,7 @@ class DateTimePlus { } class Report { - var $_dt; // we'll keep the reference to DateTime here + var $_dt; // we'll keep the reference to MyDateTime here // more properties ... function Report() @@ -89,7 +89,7 @@ class Report { // do some initialization } - function setDateTime(&$dt) + function setMyDateTime(&$dt) { $this->_dt =& $dt; } @@ -104,17 +104,17 @@ class Report { } $rep = new Report(); -$dt = new DateTime(); -$dtp = new DateTimePlus("l, F j, Y (h:i:s a, T)"); +$dt = new MyDateTime(); +$dtp = new MyDateTimePlus("l, F j, Y (h:i:s a, T)"); // generate report with simple date for web display -$rep->setDateTime(&$dt); +$rep->setMyDateTime(&$dt); echo $rep->generateReport(); // later on in the code ... // generate report with fancy date -$rep->setDateTime(&$dtp); +$rep->setMyDateTime(&$dtp); $output = $rep->generateReport(); // save $output in database // ... etc ...