On Mon, 23 Jul 2007, Alexandru Stanoi wrote:

> Frederik Holljen wrote:
> > 
> >> Using unique IDs to refer to messages in IMAP was needed by many 
> >> developers (as I have seen on IRC). So here it is finally!
> >>
> >> In IMAP a message can be accessed by its message number (which can 
> >> change over time as messages are deleted and received) or by its 
> >> unique ID (which usually never changes).
> >>
> >> To enable using IDs, create the IMAP transport object with an extra 
> >> option:
> >>
> >> <code>
> >> $imap = new ezcMailImapTransport( 'server', null, array(
> >> 'uidReferencing' => true ) );
> >> </code>
> >>
> >> Alternatively you can set the option via an option object:
> >> <code>
> >> $options = new ezcMailImapTransportOptions();
> >> $options->uidReferencing = true;
> >>
> >> $imap = new ezcMailImapTransport( 'server' );
> >> $imap->options = $options;
> >> </code>
> > 
> > Isn't this a bit confusing having dual purpose for the same functions like 
> > this?
> 
> How is it confusing? I think it is similar with Base::autoload() which 
> uses the debug option to throw an exception or not.

I remember mentioning to you as well that I found it slightly confusing, 
but I didn't really see a nicer solution either. 

[snip]

> > Is enabling it in the start a requirement (any internal referencing 
> > done?). If not it would be possible to add an uid option to each of the 
> > methods that may accept it like
> > <code>
> > $imap->top(, 325, true ); // second option enables uids.
> > </code>
> > 
> > Another option is to have separate methods for uids.. but that will be 
> > messy..
> > <code>
> > $imap->topUid( 325 );
> > </code>
> 
> I thought of both your ideas, but I decided to implement it with an 
> option because it seemed easier to understand. Nobody said anything 
> about it for 3 weeks, so it must be the perfect solution then.

Heh - it doesn't work like that, especially during holiday season :)

> But maybe somebody else has a better idea?

Unfortunately not.

regards,
Derick
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to