| 1 | <?php |
||
| 24 | class Port extends AbstractComponent implements PortInterface |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * @inheritdoc |
||
| 28 | */ |
||
| 29 | 823 | protected function validate($data) |
|
| 30 | { |
||
| 31 | 823 | if ('' === $data) { |
|
| 32 | 3 | throw new InvalidArgumentException('Expected port to be a int or null; received an empty string'); |
|
| 33 | } |
||
| 34 | |||
| 35 | 820 | return $this->validatePort($data); |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * DEPRECATION WARNING! This method will be removed in the next major point release |
||
| 40 | * |
||
| 41 | * @deprecated deprecated since version 4.2 |
||
| 42 | * |
||
| 43 | * Return an integer representation of the Port component |
||
| 44 | * |
||
| 45 | * @return int|null |
||
| 46 | */ |
||
| 47 | public function toInt() |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @inheritdoc |
||
| 54 | */ |
||
| 55 | 2 | public function __debugInfo() |
|
| 59 | |||
| 60 | /** |
||
| 61 | * Returns the instance string representation |
||
| 62 | * with its optional URI delimiters |
||
| 63 | * |
||
| 64 | * @return string |
||
| 65 | */ |
||
| 66 | 155 | public function getUriComponent() |
|
| 75 | } |
||
| 76 |