| 1 | <?php namespace Tarsana\Command\Console; |
||
| 5 | class OutTransformer implements TransformerInterface { |
||
| 6 | |||
| 7 | const CSI = "\033["; |
||
| 8 | |||
| 9 | const CONTROLS = [ |
||
| 10 | 'up' => '$2A', |
||
| 11 | 'down' => '$2B', |
||
| 12 | 'right' => '$2C', |
||
| 13 | 'left' => '$2D', |
||
| 14 | 'nextLine' => '$2E', |
||
| 15 | 'prevLine' => '$2F', |
||
| 16 | 'column' => '$2G', |
||
| 17 | |||
| 18 | 'clearBefore' => '1J', |
||
| 19 | 'clearAfter' => 'J', |
||
| 20 | 'clearLine' => '2K', |
||
| 21 | 'clearAll' => '3J', |
||
| 22 | 'clear' => '2J', |
||
| 23 | |||
| 24 | 'color' => '38;5;$2m', |
||
| 25 | 'background' => '48;5;$2m', |
||
| 26 | 'reset' => '0m', |
||
| 27 | 'bold' => '1m', |
||
| 28 | 'underline' => '4m' |
||
| 29 | ]; |
||
| 30 | |||
| 31 | protected $aliases = []; |
||
| 32 | |||
| 33 | public function alias(string $name, string $value) { |
||
| 37 | |||
| 38 | public function transform(string $text) : string |
||
| 50 | } |
||
| 51 |