56 lines
880 B
PHP
56 lines
880 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Classes\BBS\Control;
|
||
|
|
||
|
use App\Classes\BBS\Control;
|
||
|
|
||
|
/**
|
||
|
* Class Test
|
||
|
*
|
||
|
* This is a test class for Control Validation Processing
|
||
|
*
|
||
|
* @package App\Classes\Control
|
||
|
*/
|
||
|
class Test extends Control
|
||
|
{
|
||
|
public function boot()
|
||
|
{
|
||
|
$this->so->co->send(CLS.HOME.DOWN.CON);
|
||
|
|
||
|
$this->so->co->send('Press 1, or 2, or 4, 0 to end.');
|
||
|
}
|
||
|
|
||
|
// @todo *00/09 doesnt work
|
||
|
public function handle(string $read): string
|
||
|
{
|
||
|
switch ($read)
|
||
|
{
|
||
|
case 0:
|
||
|
$this->complete = TRUE;
|
||
|
$read = '';
|
||
|
break;
|
||
|
|
||
|
case 1:
|
||
|
$this->so->co->send('You pressed ONE.');
|
||
|
$read = '';
|
||
|
break;
|
||
|
|
||
|
case 2:
|
||
|
$this->so->co->send('You pressed TWO.');
|
||
|
$read = '';
|
||
|
break;
|
||
|
|
||
|
case 3:
|
||
|
$this->so->co->send('You pressed THREE.');
|
||
|
$read = '';
|
||
|
break;
|
||
|
|
||
|
case 4:
|
||
|
$this->so->co->send('You pressed FOUR.');
|
||
|
$read = '';
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
return $read;
|
||
|
}
|
||
|
}
|