| @@ 85-94 (lines=10) @@ | ||
| 82 | return $this->proto; |
|
| 83 | } |
|
| 84 | ||
| 85 | public function setManagementPort($managementPort) |
|
| 86 | { |
|
| 87 | if (!is_int($managementPort)) { |
|
| 88 | throw new InvalidArgumentException('parameter must be int'); |
|
| 89 | } |
|
| 90 | if (1024 >= $managementPort || 65536 <= $managementPort) { |
|
| 91 | throw new InstanceException('invalid port, must be positive integer between 1025 and 65535'); |
|
| 92 | } |
|
| 93 | $this->managementPort = $managementPort; |
|
| 94 | } |
|
| 95 | ||
| 96 | public function getManagementPort() |
|
| 97 | { |
|
| @@ 101-110 (lines=10) @@ | ||
| 98 | return $this->managementPort; |
|
| 99 | } |
|
| 100 | ||
| 101 | public function setPort($port) |
|
| 102 | { |
|
| 103 | if (!is_int($port)) { |
|
| 104 | throw new InvalidArgumentException('parameter must be int'); |
|
| 105 | } |
|
| 106 | if (1024 >= $port || 65536 <= $port) { |
|
| 107 | throw new InstanceException('invalid port, must be positive integer between 1025 and 65535'); |
|
| 108 | } |
|
| 109 | $this->port = $port; |
|
| 110 | } |
|
| 111 | ||
| 112 | public function getPort() |
|
| 113 | { |
|