Remove deprecated methods
This commit is contained in:
@@ -93,9 +93,6 @@ class Message extends FTNBase
|
||||
private Echomail|Netmail $mo; // The object storing this packet message
|
||||
private Address $us; // Our address for this message
|
||||
|
||||
/** @deprecated Not sure why this is needed? */
|
||||
public bool $packed = FALSE; // Has the message been packed successfully
|
||||
|
||||
// Convert characters into printable chars
|
||||
// https://int10h.org/oldschool-pc-fonts/readme/#437_charset
|
||||
private const CP437 = [
|
||||
@@ -379,17 +376,6 @@ class Message extends FTNBase
|
||||
case 'tftn':
|
||||
return parent::__get($key);
|
||||
|
||||
// For 5D we need to include the domain
|
||||
/* @deprecated - is this required? */
|
||||
case 'fboss':
|
||||
return sprintf('%d:%d/%d',$this->fz,$this->fn,$this->ff).(($x=$this->fdomain) ? '@'.$x->name : '');
|
||||
case 'tboss':
|
||||
return sprintf('%d:%d/%d',$this->tz,$this->tn,$this->tf).(($x=$this->tdomain) ? '@'.$x->name : '');
|
||||
case 'fboss_o':
|
||||
return Address::findFTN($this->fboss);
|
||||
case 'tboss_o':
|
||||
return Address::findFTN($this->tboss);
|
||||
|
||||
// Convert our message (header[datetime]) with our TZUTC into a Carbon date
|
||||
case 'datetime':
|
||||
try {
|
||||
|
@@ -340,53 +340,6 @@ abstract class Packet extends FTNBase implements \Iterator, \Countable
|
||||
|
||||
/* METHODS */
|
||||
|
||||
/**
|
||||
* When creating a new packet, set the header.
|
||||
*
|
||||
* @param Address $oo
|
||||
* @param Address $o
|
||||
* @param string|null $passwd Override the password used in the packet
|
||||
* @deprecated Use Packet::generate(), which should generate a packet of the right type
|
||||
*/
|
||||
public function addressHeader(Address $oo,Address $o,string $passwd=NULL): void
|
||||
{
|
||||
Log::debug(sprintf('%s:+ Creating packet for [%s]',self::LOGKEY,$o->ftn));
|
||||
|
||||
$date = Carbon::now();
|
||||
|
||||
// Create Header
|
||||
$this->header = [
|
||||
'ozone' => $oo->zone->zone_id, // Orig Zone
|
||||
'dzone' => $o->zone->zone_id, // Dest Zone
|
||||
'onet' => $oo->host_id ?: $oo->region_id, // Orig Net
|
||||
'dnet' => $o->host_id ?: $o->region_id, // Dest Net
|
||||
'onode' => $oo->node_id, // Orig Node
|
||||
'dnode' => $o->node_id, // Dest Node
|
||||
'opoint' => $oo->point_id, // Orig Point
|
||||
'dpoint' => $o->point_id, // Dest Point
|
||||
'odomain' => $oo->zone->domain->name, // Orig Domain
|
||||
'ddomain' => $o->zone->domain->name, // Dest Domain
|
||||
'y' => $date->format('Y'), // Year
|
||||
'm' => $date->format('m')-1, // Month
|
||||
'd' => $date->format('d'), // Day
|
||||
'H' => $date->format('H'), // Hour
|
||||
'M' => $date->format('i'), // Minute
|
||||
'S' => $date->format('s'), // Second
|
||||
'password' => strtoupper((! is_null($passwd)) ? $passwd : $o->pass_packet), // Packet Password
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a message to this packet
|
||||
*
|
||||
* @param Message $o
|
||||
* @deprecated No longer used when Address::class is updated
|
||||
*/
|
||||
public function addMail(Message $o): void
|
||||
{
|
||||
$this->messages->push($o);
|
||||
}
|
||||
|
||||
public function for(Address $ao): self
|
||||
{
|
||||
$this->tftn_p = $ao;
|
||||
@@ -509,11 +462,4 @@ abstract class Packet extends FTNBase implements \Iterator, \Countable
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @deprecated Is this used? */
|
||||
public function pluck(string $key): Collection
|
||||
{
|
||||
throw new \Exception(sprintf('%s:! This function is deprecated - [%s]',self::LOGKEY,$key));
|
||||
return $this->messages->pluck($key);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user