RE: [PEAR] [ANNOUNCEMENT] DB_DataObject-0.19 (stable) Released.
| From: | ThE PhP_KiD | Date: | Fri, 23 May 2003 17:08:43 +0000 |
| Subject: | RE: [PEAR] [ANNOUNCEMENT] DB_DataObject-0.19 (stable) Released. | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-5579@lists.php.net to get a copy of this message | ||
Sounds great!
mac
--
...ThE PhP_KiD.
-> -----Mensaje original-----
-> De: Alan Knowles [mailto:alan@akbkhome.com]
-> Enviado el: Viernes, 23 de Mayo de 2003 12:24 p.m.
-> Para: pear-general@lists.php.net; The Php_kid
-> CC: PEAR
-> Asunto: Re: [PEAR] [ANNOUNCEMENT] DB_DataObject-0.19 (stable) Released.
->
->
-> http://devel.akbkhome.com/peardoc2/package.database.db-dataobject
-> .db-dataobject.settersgetters.html
->
-> basically overload with __call(), means that if you have your standard
-> person object with name and birth_day .. and with just the standard
-> autogenerated file.
->
-> Then do
-> echo $person->getName();
-> echo $person->getBirth_Day();
->
-> it is equivilant to doing
-> echo $person->name;
-> echo $person->birth_day;
->
-> and it will work, even though there is no method getName defined
-> anywhere..
->
-> now if a bit later on you decide you dont like the iso format for birth
-> day - you can really define a method getBirth_Day(), to return a
-> formated version. In which case the default __call method is not used..
->
-> be a little carefull that setters and gettes accept each others input
-> and output, as setFrom relays into setters, and toArray relays into
-> getters..
->
-> Regards
-> Alan
->
->
->
->
->
->
-> The Php_kid wrote:
-> > Hi,
-> >
-> > what is this ?
-> >
-> > ->
-> > -> - overload extension enabled to relay setFrom and toArray calls
-> > -> to get*, set*
-> > -> methods, which are predefined as
-> > -> getXXX = returns $object->XXX
-> > -> setXXX($V) = returns true (or an error string if you
-> create your own)
-> > -> (only affects php-4.3.2RC2 or later..)
-> > ->
-> >
-> > Thanks !
-> >
-> > Regards
-> > mac
-> > --
-> > ...ThE PhP_KiD.
->
->
-> --
-> PEAR General Mailing List (http://pear.php.net/)
-> To unsubscribe, visit: http://www.php.net/unsub.php