Re: Object Function-call handling in PHP5
| From: | Thorsten Suckow-Homberg | Date: | Wed, 28 Sep 2005 15:15:05 +0000 |
| Subject: | Re: Object Function-call handling in PHP5 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-223359@lists.php.net to get a copy of this message | ||
This is a toughy I've been working over for a bit. I was wondering if there is a way to cause objects to have certain behaviors when builtin functions are called, or maybe a way of setting, for example, a "primary" string which is used whenever a function requiring a string calls it.Take a look at http://www.php.net/php5, section "Magic Methods" In your case the __toString() method would be valuable... Regards Thorsten Suckow-Homberg