Kelly Hallman <mailto:[EMAIL PROTECTED]>
on Monday, April 19, 2004 12:34 PM said:
> I think what you're talking about here is encapsulation.
in that case what is abstraction?
>> PROPOSED CHANGE:
>> class Customer {
>> ...
>> function initialize_customer($customer_id) {
>> // grab data from db
>> $this->fname = $...[0]['fname'];
>> $this->lname = $...[0]['lname'];
>> $this->age = $...[0]['age']; }
i see my code has been run through the kellytron 5000. ;)
> class Customer {
>
> var $res = array();
what does $res stand for? result?
> var $id, $fname, $lname;
>
> function Customer($id=null) {
> $id === null || $this->initCustomer($id); }
what is the above line equivalent to and why is '$id == null' not
sufficient?
> My point: it's redundant to have $obj->fname and $obj->firstName(),
> and may encourage mixing the way you access the object data from your
> code, which could potentially defeat the purpose of the get/set
> method.
i see what you mean.
thanks,
chris.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php