Re: [PHP]About the magic function __call

2008-08-27 Thread Paulo Sousa
My information was incomplete: I'm running php 5.1.2 (a requirement from the customer). I found this http://bugs.php.net/bug.php?id=42937 I "coded" this without testing, using only the idea. Thanks! Thanks for the help Nathan! 2008/8/27 Nathan Nobbe <[EMAIL PROTECTED]> > On Wed, Aug 27, 2008 a

Re: [PHP]About the magic function __call

2008-08-27 Thread Nathan Nobbe
On Wed, Aug 27, 2008 at 1:49 PM, Nathan Nobbe <[EMAIL PROTECTED]>wrote: > On Wed, Aug 27, 2008 at 1:35 PM, Paulo Sousa <[EMAIL PROTECTED]>wrote: > ... > this *should* work, here is a test, tests/classes/__call_005.phpt, you can take the part beneath the --FILE-- section and see if it blows up o

Re: [PHP]About the magic function __call

2008-08-27 Thread Nathan Nobbe
On Wed, Aug 27, 2008 at 1:35 PM, Paulo Sousa <[EMAIL PROTECTED]>wrote: > Hi there! > > I'm working with the following code: > > > abstract class Foo{ > > protected $a; > protected $b; > protected $c; > > function __construct($arg){ > $this->a = $arg; > } > > function __call($function, $args){

[PHP]About the magic function __call

2008-08-27 Thread Paulo Sousa
Hi there! I'm working with the following code: a = $arg; } function __call($function, $args){ $this->b = $function; $this->c = $args; $this->doWhatever(); } private doWhatever(){ } } class Boo extends Foo{ protected $e; public function __construct(){ parent::__construct('Blah'); }