44 lines
970 B
PHP
44 lines
970 B
PHP
<?php
|
|
|
|
namespace App\Classes\Frame;
|
|
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
use App\Classes\Frame as AbstractFrame;
|
|
use App\Classes\Parser\Videotex as VideotexParser;
|
|
|
|
class Videotex extends AbstractFrame
|
|
{
|
|
public static $frame_length = 22;
|
|
public static $frame_width = 40;
|
|
|
|
public static $header_length = 20;
|
|
public static $pagenum_length = 9;
|
|
public static $cost_length = 7;
|
|
public static $cost_unit = 'u';
|
|
|
|
public static $if_filler = '.';
|
|
|
|
public function __construct(\App\Models\Frame $o,string $msg='')
|
|
{
|
|
parent::__construct($o);
|
|
|
|
// If we have a message to display on the bottom line.
|
|
if ($msg)
|
|
$this->output .= HOME.UP.$msg.HOME;
|
|
}
|
|
|
|
// @todo Change to use a Parser, like we do for ANSI
|
|
public function fields($startline=1)
|
|
{
|
|
|
|
$o = new VideotexParser($this->frame->content,$startline);
|
|
$this->output .= (string)$o;
|
|
|
|
$this->fields = $o->fields;
|
|
}
|
|
|
|
public function strlenv($text):int {
|
|
return strlen($text)-substr_count($text,ESC);
|
|
}
|
|
} |