Default packet constructor can take data

This commit is contained in:
Stephen Paul Weber 2010-04-01 09:17:09 -05:00
parent 6ac274b8ec
commit 36fba1596d

View File

@ -292,8 +292,9 @@ class OpenPGP_Packet {
return array($tag, $head_length, $data_length);
}
function __construct() {
function __construct($data=NULL) {
$this->tag = array_search(substr(substr(get_class($this), 8), 0, -6), self::$tags);
$this->data = $data;
}
function read() {