note 31112 added to function.ob-start
| From: | eric at sharpdreams dot com | Date: | Thu, 10 Apr 2003 05:12:42 +0000 |
| Subject: | note 31112 added to function.ob-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46438@lists.php.net to get a copy of this message | ||
An expansion on the undocumented feature above (passing an array as the function name for
ob_start()):
If you have a class that handles output (or whatever your class does), you can have it reference
itself as the output handler:
class test {
function test() {
// constructor
ob_start(array(&$this, "end"));
}
function end($buff) {
// do some modifications on $buff here
return($buff);
}
}
--
http://www.php.net/manual/en/function.ob-start.php
http://master.php.net/manage/user-notes.php?action=edit+31112
http://master.php.net/manage/user-notes.php?action=delete+31112
http://master.php.net/manage/user-notes.php?action=reject+31112