55 lines
835 B
PHP
55 lines
835 B
PHP
<?php
|
|
|
|
namespace App\Classes\Control;
|
|
|
|
use App\Classes\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.');
|
|
}
|
|
|
|
public function handle(string $read)
|
|
{
|
|
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;
|
|
}
|
|
} |