Re: RFC: Property get/set syntax
2012/4/20 Stas Malyshev <[email protected]>:
> How these would work with isset - what !empty($this->Hours) return? What
> would happen if you do unset($this->Hours)? What happens if you do
> $this->Hours++ or sort($this->Hours) (assuming $Hours is an array)?
> These things need to be defined in the RFC too.
My suggestion is to support the same methods for properties as we do
for magic class methods: __set, __get, __isset and __unset.
All the other operations (sort, ++, <<,...) should behave exactly as
if it was be implemented with current magic class methods with a usual
switch/case statement.
Thread (12 messages)