On Fri, Jan 11, 2013 at 8:08 AM, Stas Malyshev <smalys...@sugarcrm.com> wrote:
> Hi!
>
>> Re the ReflectionProperty::getParentProperty($this, 'foo') suggestion,
>> is this supposed to already get the value of the property (and there
>> would be an additional method ReflectionProperty::setParentProperty)?
>
> I meant getting the ReflectionProperty class, but getting the actual
> value is an option too. Of course, then it should be method on
> ReflectionPropertyAccessor, since regular properties don't have this
> thing. I'm not sure which is better - it depends on how much this would
> be used. We could even not do anything special at all - as I said,
> current reflection already has API to allow doing exactly this (well,
> after property support is added), even if a bit long-winded.
>
>> The current property can be obtained through
>> EG(current_execute_data)->function_state.function. This holds the
>> accessor function and the property can be taken from its name. Though
>> this is obviously all a bit dirty and is probably not a good idea.
>> Probably better to let people explicitly pass the property name.
>
> I agree. That's why I also mentioned having __PROPERTY__ - this makes
> copypasting methods a bit easier since you have less chances of making
> typo in property names :)
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>

I'm guessing this RFC won't make it in PHP 5.5? Too bad since it did
seem like a very nice feature to have.

I don't know if it is very helpful but posting nevertheless. I'm a
C++/Qt/QML/PHP developer and for me the proposed syntax in the v1.2
document makes perfect sense and is intuitive to use. As for the
earlier example about isset...

i'd expect an example like this:

class SomeClass {
    public $date {
        get;
        set(DateTime $date);
    }
}

$temp = new SomeClass();
i'd expect "isset($temp->date)" to return exactly the same as if the
class where defined like this:

class SomeClass {
    public $date;
}

I don't know if that issue was already sorted out but i wanted to
share my expectations in that regards.

Will this make PHP 5.5? Or will it be deferred to 5.6?

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to