Hi Stas, hi everbody, Am Dienstag, den 29.04.2008, 10:22 -0700 schrieb Stanislav Malyshev: [...] > In any case, whenever you want to write $foo->bar, just write > $foo->getBar() and $foo->setBar(), and it'd work :)
I think the issue is, that PHP does not have defined properties with attached validation (yes, I know about __get()/__set()). Now we just have plain properties that may contain everything. If we would have something like this: class Clazz { public $property { function get() { return $this->property; } function set($property) { $this->property = (int)$property; } } } In this case it, maybe it would make sense to allow definitions of properties in interfaces. For example the following could require a property to be read only: class Clazz { public $property { function get(); } } An interface defines a halfway strict API. Allowing the current properties in interfaces would not add any sensible functionality because it would not define the API better. cu, Lars
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil