Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [propel-dev] roadmap > Reply to message

Reply to message

* = Required fields
* Subject
* Body
Send reply to
Author (directly in email)
Please type the letters in the image above.

Original message

Author hlellelid
Full name Hans Lellelid
Date 2006-03-28 09:39:47 PST
Message David Z├╝lke wrote:
> Am 28.03.2006 um 19:24 schrieb Hans Lellelid:
>> Yeah, the problem doesn't really apply to __call(), you're right. More
>> for __get()/__set():
>> Current API:
>> print "Date is " . $obj->getDateValue("Y-m-d");
>> Desired API (as I understand it):
>> print "Date is " . date("Y-m-d", $obj->dateValue);
> I don't think we should use accessors. Let's stick to getDateValue().
> We'll have one __call() method that handles getters and setters for all
> fields. Makes the generated classes a lot slimmer ;) Also, we actually
> _have_ to do it this way because you couldn't implement custom stuff in
> the stubs otherwise.

That's a good point. I guess overriding __get / __set would be
extremely cumbersome. Using __call() would definitely help keep things
slim, though, true.