This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
vbbs/app/Classes/Frame/Videotex.php

41 lines
919 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Classes\Frame;
use Illuminate\Support\Facades\Log;
2019-07-12 03:42:01 +00:00
use App\Classes\Frame;
use App\Classes\Parser;
2018-12-29 12:24:41 +00:00
use App\Classes\Parser\Videotex as VideotexParser;
2019-07-12 03:42:01 +00:00
use App\Models\Frame as FrameModel;
2019-07-12 03:42:01 +00:00
class Videotex extends Frame
{
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';
2018-12-11 12:31:44 +00:00
public static $if_filler = '.';
2019-07-12 03:42:01 +00:00
public function __construct(FrameModel $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;
}
2019-07-12 03:42:01 +00:00
protected function parser(int $startline): Parser
{
2019-07-12 03:42:01 +00:00
return new VideotexParser($this->fo->content,self::$frame_width,$startline);
}
2019-07-12 03:42:01 +00:00
public static function strlenv($text):int {
return strlen($text)-substr_count($text,ESC);
}
}