<?php /** * Template for starting a message */ namespace App\Traits; use App\Classes\{ANSI,Page}; use App\Classes\Fonts\{Thick,Thin}; trait PageTemplate { protected function page(bool $addlogo=FALSE,string $leftbox=''): Page { $page = new Page; if ($addlogo) $page->addLogo(new ANSI('public/logo/netmail.bin')); $header = new Thick; $header->addText('Clearing Houz'); $page->addHeader($header,'FTN Mailer and Tosser',TRUE,0xc4); if ($leftbox) { $lbc = new Thin; $lbc->addText($leftbox); $page->addLeftBoxContent($lbc); } return $page; } }