Setup to present different mail bundle types
This commit is contained in:
@@ -26,6 +26,9 @@ abstract class Packet extends FTNBase implements \Iterator, \Countable
|
||||
protected const PACKED_MSG_LEAD = "\02\00";
|
||||
protected const PACKED_END = "\00\00";
|
||||
|
||||
public const MSG_TYPE2 = 1<<0;
|
||||
public const MSG_TYPE4 = 1<<2;
|
||||
|
||||
// @todo Rename this regex to something more descriptive, ie: FILENAME_REGEX
|
||||
public const regex = '([[:xdigit:]]{4})(?:-(\d{4,10}))?-(.+)';
|
||||
|
||||
@@ -242,10 +245,12 @@ abstract class Packet extends FTNBase implements \Iterator, \Countable
|
||||
case 'tftn':
|
||||
return parent::__get($key);
|
||||
|
||||
case 'product':
|
||||
return Arr::get($this->header,'prodcode-hi')<<8|Arr::get($this->header,'prodcode-lo');
|
||||
|
||||
case 'software':
|
||||
$code = Arr::get($this->header,'prodcode-hi')<<8|Arr::get($this->header,'prodcode-lo');
|
||||
Software::unguard();
|
||||
$o = Software::singleOrNew(['code'=>$code,'type'=>Software::SOFTWARE_TOSSER]);
|
||||
$o = Software::singleOrNew(['code'=>$this->product,'type'=>Software::SOFTWARE_TOSSER]);
|
||||
Software::reguard();
|
||||
|
||||
return $o;
|
||||
|
Reference in New Issue
Block a user