Re: QF $process() - does callback have to be a string?
| From: | Justin Patrin | Date: | Thu, 04 Nov 2004 18:51:01 +0000 |
| Subject: | Re: QF $process() - does callback have to be a string? | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15338@lists.php.net to get a copy of this message | ||
On Thu, 04 Nov 2004 12:33:09 +0900, KOYAMA Tetsuji <koyama@hoge.org> wrote:
>
> Hi,
>
> At Wed, 3 Nov 2004 17:26:02 -0500,
> Erik Heerlein wrote:
> > is there a way to use a method of an object from an included class?
> > Like,
> >
> > $form->process($object->doSomething);
>
>
> RTFM :-)
>
>
> http://pear.php.net/manual/en/package.html.html-quickform.html-quickform.process.php
>
> Use this:
> $form->process(array($object, 'doSomething'));
>
> $object must be reference.
>
So that should really be:
$form->process(array(&$object, 'doSomething'));
then shouldn't it?
--
paperCrane --Justin Patrin--