note 44737 added to function.xml-set-object

From: Date: Sat, 14 Aug 2004 22:38:08 +0000
Subject: note 44737 added to function.xml-set-object
Groups: php.notes 
Request: Send a blank email to php-notes+get-74651@lists.php.net to get a copy of this message
(Adding to zitan's note) It seems easy enough to provide output functions for callback handler classes too. Example: <?php class CallBack { var $name = 'Callback'; var $info = 'Information!'; function toString() { return $this->name.': '.$this->info; } } class Main { var $name = 'Main'; var $callBackObject; function setCallBack(&$cBIn) { $this->callBackObject = $cBIn; } function toString() { return $this->name.': '.$this->callBackObject->toString(); } } $cb = & new CallBack; $m = & new Main; $m->setCallBack(&$cb); echo $cb->toString(); echo $m->toString(); ?> So, after collecting information during the parse operation within the callback handler class, e.g. in tag_close(), retrieving them is possible. ---- Manual Page -- http://www.php.net/manual/en/function.xml-set-object.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44737 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44737&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44737&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#74651) next »