| @@ 106-115 (lines=10) @@ | ||
| 103 | return $this->dev; |
|
| 104 | } |
|
| 105 | ||
| 106 | public function setManagementPort($managementPort) |
|
| 107 | { |
|
| 108 | if (!is_int($managementPort)) { |
|
| 109 | throw new InvalidArgumentException('parameter must be int'); |
|
| 110 | } |
|
| 111 | if (1024 >= $managementPort || 65536 <= $managementPort) { |
|
| 112 | throw new InstanceException('invalid port, must be positive integer between 1025 and 65535'); |
|
| 113 | } |
|
| 114 | $this->managementPort = $managementPort; |
|
| 115 | } |
|
| 116 | ||
| 117 | public function getManagementPort() |
|
| 118 | { |
|
| @@ 122-131 (lines=10) @@ | ||
| 119 | return $this->managementPort; |
|
| 120 | } |
|
| 121 | ||
| 122 | public function setPort($port) |
|
| 123 | { |
|
| 124 | if (!is_int($port)) { |
|
| 125 | throw new InvalidArgumentException('parameter must be int'); |
|
| 126 | } |
|
| 127 | if (1024 >= $port || 65536 <= $port) { |
|
| 128 | throw new InstanceException('invalid port, must be positive integer between 1025 and 65535'); |
|
| 129 | } |
|
| 130 | $this->port = $port; |
|
| 131 | } |
|
| 132 | ||
| 133 | public function getPort() |
|
| 134 | { |
|