Re: OOP question in relation to PEAR::Auth
| From: | Martin Jansen | Date: | Tue, 25 Feb 2003 13:04:40 +0000 |
| Subject: | Re: OOP question in relation to PEAR::Auth | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3947@lists.php.net to get a copy of this message | ||
On Tue Feb 25, 2003 at 10:4347AM +0100, Jeroen Houben wrote:
> class Visitor extends Auth
> {
> $remoreIP;
> .. etc
> }
>
> or create a seperate class for visitor and make an instance of the Auth
> class a property of this class:
>
> class Visitor
> {
> $remoteIP;
> $auth; // PEAR::Auth instance;
> }
>
> I can't figure out if my visitor class "is an" Auth or "has an" Auth.
I guess the best (semantically correct) solution is to create an
instance of PEAR::Auth in the visitor class.
--
- Martin Martin Jansen
http://martinjansen.com/