Added ANSI parsers and rendering ANSI frames
This commit is contained in:
@@ -15,4 +15,17 @@ class FrameFields
|
||||
{
|
||||
return array_get($this->fields,$key);
|
||||
}
|
||||
|
||||
public function output(string $filler)
|
||||
{
|
||||
switch ($this->type) {
|
||||
case 'd':
|
||||
$out = date('D d M H:ia');
|
||||
|
||||
return substr($out.($this->length > strlen($out) ? str_repeat($filler,$this->length-strlen($out)) : ''),0,$this->length);
|
||||
|
||||
default:
|
||||
return str_repeat($filler,$this->length);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user