[
https://issues.apache.org/jira/browse/ZETACOMP-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029991#comment-13029991
]
Derick Rethans commented on ZETACOMP-79:
----------------------------------------
Patch looks good, but a few comments:
- Mail/tests/parser/iterator_test.php
- The declare thing in line 2 is not needed.
- Please make sure that every file ends with ?> + newline
- Did you regenerate the Mail/src/mail_autoload.php file with a script; or
added the entries manually? The order is sortof important, so make sure this
file is generated with scripts/generate-autoload-file.php"
- in imap_set and iterator_test.php you're not following the CS. We use "as"
and not "AS", as well as some spaces and braces issues in many files:
if ($this->currentMessage === null || $this->currentMessage === false) {
should be something like:
if ( $this->currentMessage === null || $this->currentMessage === false )
{
We're very roomy :-)
Is there a way how to make pop3, or any of the other transports also set a UID
like thing?
> Add Iterate method to ezcMailParser and allow access through uids through
> intermediate ezcMailInfo struct
> ---------------------------------------------------------------------------------------------------------
>
> Key: ZETACOMP-79
> URL: https://issues.apache.org/jira/browse/ZETACOMP-79
> Project: Zeta Components
> Issue Type: New Feature
> Components: Mail
> Reporter: Benjamin Eberlei
> Attachments: zeta_mail_referenceableset_parseriterator.patch
>
>
> There are several problems with the ezcMailParser at the moment:
> 1. It parses all mails at once, creating unnecessary memory overhead
> (although attachments are already handled very efficently)
> 2. It does not expose information about the UID (in case of IMAP) that this
> mail belonged to. Without this information there is no way to reference the
> parsed mail for further actions.
> Solution:
> Add a new method ezcMailParser->iterate method that returns an iterator
> spitting out ezcMailInfo structs lazily (prototype impl):
> class ezcMailInfo
> {
> /** Optional, null if the set is NOT a ezcMailReferencableParserSet */
> public $id = null;
> /** @var ezcMail */
> public $mail;
> }
> The ID property contains the reference id for the underlying transport, for
> example with IMAP the UID.
> With this idea there comes a problem. The ezcMailParser currently has no
> access to the UID of the ezcMailImapSet. That means we have to introduce a
> new interface:
> interface ezcMailReferencableParserSet
> {
> public function getCurrentUniqueMessageId();
> }
> The IMAP Transport has to implement it and return the UID (or null if
> uidReference = false). The Parser could then use this information to access
> the message id.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira