On Sat, Jul 19, 2008 at 10:55 PM, Jake McGraw <[EMAIL PROTECTED]> wrote:
>
>> > 1. You're using "Call-time pass-by-reference" by marking your return
>> > value
>> > with an ampersand, try changing your code to this:
>> >
>> > public function __get($field) {
>> > return &$this->_data[$field];
>> >
> > 1. You're using "Call-time pass-by-reference" by marking your return
> value
> > with an ampersand, try changing your code to this:
> >
> > public function __get($field) {
> > return &$this->_data[$field];
> > }
>
> But I don't want the default behavior to be to return a reference.
>
> Mike
>
On Sat, Jul 19, 2008 at 9:17 PM, Jake McGraw <[EMAIL PROTECTED]> wrote:
>
>
> On Sat, Jul 19, 2008 at 5:36 PM, Michael B Allen <[EMAIL PROTECTED]> wrote:
>>
>> I have a class that implements __get which retrieves the named
>> attribute from a $this->_data array. In the past I believe I was able
>>
On Sat, Jul 19, 2008 at 5:36 PM, Michael B Allen <[EMAIL PROTECTED]> wrote:
> I have a class that implements __get which retrieves the named
> attribute from a $this->_data array. In the past I believe I was able
> to do the following:
>
> $a = &$this->a;
Could you post the code for your __get
I have a class that implements __get which retrieves the named
attribute from a $this->_data array. In the past I believe I was able
to do the following:
$a = &$this->a;
such that modifying array $a would be reflected in the underlying
$this->_data array.
However currently I'm using a machine