Internal rework pending editframe
This commit is contained in:
@@ -4,10 +4,12 @@ namespace App\Classes\Frame;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Classes\Frame as AbstractFrame;
|
||||
use App\Classes\Frame;
|
||||
use App\Classes\Parser;
|
||||
use App\Classes\Parser\Videotex as VideotexParser;
|
||||
use App\Models\Frame as FrameModel;
|
||||
|
||||
class Videotex extends AbstractFrame
|
||||
class Videotex extends Frame
|
||||
{
|
||||
public static $frame_length = 22;
|
||||
public static $frame_width = 40;
|
||||
@@ -19,7 +21,7 @@ class Videotex extends AbstractFrame
|
||||
|
||||
public static $if_filler = '.';
|
||||
|
||||
public function __construct(\App\Models\Frame $o,string $msg='')
|
||||
public function __construct(FrameModel $o,string $msg='')
|
||||
{
|
||||
parent::__construct($o);
|
||||
|
||||
@@ -28,17 +30,12 @@ class Videotex extends AbstractFrame
|
||||
$this->output .= HOME.UP.$msg.HOME;
|
||||
}
|
||||
|
||||
// @todo Change to use a Parser, like we do for ANSI
|
||||
public function fields($startline=1)
|
||||
protected function parser(int $startline): Parser
|
||||
{
|
||||
|
||||
$o = new VideotexParser($this->frame->content,$startline);
|
||||
$this->output .= (string)$o;
|
||||
|
||||
$this->fields = $o->fields;
|
||||
return new VideotexParser($this->fo->content,self::$frame_width,$startline);
|
||||
}
|
||||
|
||||
public function strlenv($text):int {
|
||||
public static function strlenv($text):int {
|
||||
return strlen($text)-substr_count($text,ESC);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user