Re: Overloading Limitation- Can Someone Confirm?

From: Date: Thu, 30 Mar 2006 13:11:19 +0000
Subject: Re: Overloading Limitation- Can Someone Confirm?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-232918@lists.php.net to get a copy of this message
Jochem Maas wrote:
I think its a misunderstanding on the one side and a limitation on the other, you can't use overloading directly on items of an overloaded array e.g:
    echo $tc->arr['a']
this is triggers a call to __get() with the $key parameter set to something like (I'm guessing) "arr['a']"
No, I'm pretty sure (too lazy and tired right now to test...) that if things work as they should, it will look up __get() with the key parameter set to 'arr', and treat the return value of that as an array, looking for the 'a' key inside that array. Or at least it should, dammit. -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM jasper@album.co.nz 021 708 334

« previous php.general (#232918) next »