Author: Tobias Schlitt
Date: 2006-09-22 21:35:26 +0200 (Fri, 22 Sep 2006)
New Revision: 3543
Log:
- Implemented read access to property ezcMailPart->headers for extending this
class and its derives.
Modified:
trunk/Mail/ChangeLog
trunk/Mail/src/interfaces/part.php
trunk/Mail/tests/parser/parser_test.php
trunk/Mail/tests/parts/text_part_test.php
Modified: trunk/Mail/ChangeLog
===================================================================
--- trunk/Mail/ChangeLog 2006-09-22 18:57:29 UTC (rev 3542)
+++ trunk/Mail/ChangeLog 2006-09-22 19:35:26 UTC (rev 3543)
@@ -7,6 +7,8 @@
ezcMailParser->parse() can now deal with classes that extend ezcMail.
Additionally, added this functionality to ezcMailTool::replyToMail().
- Implemented suggestion #8988: ezcMailAddress should implement __toString().
+- Implemented read access to property ezcMailPart->headers for extending this
+ class and its derives.
- Fixed bug #8990: ezcMail->messageID should be named ezcMail->messageId
- Added a new class (ezcMailVirtualFile) to allow attachments from memory.
Modified: trunk/Mail/src/interfaces/part.php
===================================================================
--- trunk/Mail/src/interfaces/part.php 2006-09-22 18:57:29 UTC (rev 3542)
+++ trunk/Mail/src/interfaces/part.php 2006-09-22 19:35:26 UTC (rev 3543)
@@ -25,6 +25,12 @@
* Content-Disposition field itself based on it's own properties when
* sending mail.
*
+ * @property-read ezcMailHeadersHolder $headers
+ * Contains the header holder object, taking care of the headers
+ * of this part. Can be retreived for reasons of extending this
+ * class and its derivals.
+ *
+ *
* @package Mail
* @version //autogen//
*/
@@ -97,6 +103,9 @@
return isset( $this->properties[$name] ) ?
$this->properties[$name] : null;
break;
+ case "headers":
+ return $this->headers;
+
default:
throw new ezcBasePropertyNotFoundException( $name );
break;
Modified: trunk/Mail/tests/parser/parser_test.php
===================================================================
--- trunk/Mail/tests/parser/parser_test.php 2006-09-22 18:57:29 UTC (rev
3542)
+++ trunk/Mail/tests/parser/parser_test.php 2006-09-22 19:35:26 UTC (rev
3543)
@@ -871,5 +871,16 @@
}
}
+
+ public function testHeadersHolder()
+ {
+ $parser = new ezcMailParser();
+ $set = new SingleFileSet(
'kmail/simple_mail_with_text_subject_and_body.mail' );
+ $mail = $parser->parseMail( $set );
+ $this->assertType(
+ "ezcMailHeadersHolder",
+ $mail[0]->headers
+ );
+ }
}
?>
Modified: trunk/Mail/tests/parts/text_part_test.php
===================================================================
--- trunk/Mail/tests/parts/text_part_test.php 2006-09-22 18:57:29 UTC (rev
3542)
+++ trunk/Mail/tests/parts/text_part_test.php 2006-09-22 19:35:26 UTC (rev
3543)
@@ -59,6 +59,10 @@
$this->assertEquals( ezcMail::EIGHT_BIT, $temp->encoding );
$this->assertEquals( 'plain', $temp->subType );
$this->assertEquals( 'dummy', $temp->text );
+ $this->assertEquals(
+ new ezcMailHeadersHolder(),
+ $temp->headers
+ );
}
public function testSetProperties()
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components