Implement to_bytes for OpenPGP_Message

This commit is contained in:
Stephen Paul Weber 2010-03-31 14:25:21 -05:00
parent 355ea44301
commit 0a85e214a6

View File

@ -141,6 +141,14 @@ class OpenPGP_Message implements IteratorAggregate, ArrayAccess {
$this->packets = $packets;
}
function to_bytes() {
$bytes = '';
foreach($this as $p) {
$bytes .= $p->to_bytes();
}
return $bytes;
}
// IteratorAggregate interface
function getIterator() {