| 1 | <?php |
||
| 5 | class Port |
||
| 6 | { |
||
| 7 | const TCP = "TCP"; |
||
| 8 | const UDP = "UDP"; |
||
| 9 | |||
| 10 | private $address; |
||
| 11 | private $number; |
||
| 12 | private $protocol; |
||
| 13 | |||
| 14 | public function __construct($address, $number, $protocol) |
||
| 20 | |||
| 21 | public function address() |
||
| 25 | |||
| 26 | public function number() |
||
| 30 | |||
| 31 | public function protocol() |
||
| 35 | |||
| 36 | public function __toString() |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param int $port |
||
| 43 | * @param string $protocol |
||
| 44 | */ |
||
| 45 | public static function build(array $env, $port, $protocol) |
||
| 54 | } |
||
| 55 |