Re: Net_IMAP Class
| From: | Richard Heyes | Date: | Sat, 15 Feb 2003 19:58:23 +0000 |
| Subject: | Re: Net_IMAP Class | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13347@lists.php.net to get a copy of this message | ||
> The high level api should be a superset of your Net_POP3 class.
> so anybody can make a wrapper class to support both protocols in one
> class (as the Mail class do with sendmail and Net_SMTP)
>
> What do you think?
I think you're plan for the Net_IMAP being the high level API is a good one,
whilst what you suggest above could be done as something like a
Net_MailStore based on the factory pattern. Eg:
$mailAccessObj = new Net_MailStore('pop3://user:password@domain');
This would make the $mailAccessObj a Net_POP3 object, or perhaps a wrapper
(eg. Net_MailStore_POP3), with a common set of methods that apply to
imap/pop3. This MailStore wrapper could in theory then encompass other
methods of storage, including Mail_Mbox (currently exists IIRC),
Mail_MailDir, Mail_Foo etc.
--
Richard Heyes
V-webmail - http://www.v-webmail.co.uk