| 1 | <?php |
||
| 8 | abstract class AbstractServer |
||
| 9 | { |
||
| 10 | protected $title; |
||
| 11 | protected $path; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var LoggerInterface |
||
| 15 | */ |
||
| 16 | protected $logger; |
||
| 17 | |||
| 18 | protected $hostname = null; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $commands = []; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $title |
||
| 27 | * @param string $path |
||
| 28 | * @param LoggerInterface $logger |
||
| 29 | */ |
||
| 30 | 5 | public function __construct($title, $path, LoggerInterface $logger = null) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @param LoggerInterface $logger |
||
| 43 | */ |
||
| 44 | public function setLogger($logger) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | 1 | public function getTitle() |
|
| 56 | |||
| 57 | /** |
||
| 58 | * @param string $title |
||
| 59 | */ |
||
| 60 | public function setTitle($title) |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | 1 | public function getPath() |
|
| 72 | |||
| 73 | /** |
||
| 74 | * @param string $path |
||
| 75 | */ |
||
| 76 | public function setPath($path) |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return string |
||
| 83 | */ |
||
| 84 | 1 | public function getHostname() |
|
| 88 | |||
| 89 | /** |
||
| 90 | * @param string $hostname |
||
| 91 | */ |
||
| 92 | 2 | public function setHostname($hostname) |
|
| 96 | |||
| 97 | /** |
||
| 98 | * @return array |
||
| 99 | */ |
||
| 100 | 2 | public function getCommands() |
|
| 104 | |||
| 105 | /** |
||
| 106 | * @param array $commands |
||
| 107 | */ |
||
| 108 | 2 | public function setCommands(array $commands) |
|
| 112 | |||
| 113 | abstract public function runCommands(); |
||
| 114 | } |
||
| 115 |