WpOrg\Requests
Port::get
Retrieve the port number to use.
Метод класса: Port{}
Хуков нет.
Возвращает
int.
Использование
$result = Port::get( $type );
- $type(строка) (обязательный)
- Request type. The following requests types are supported:
'acap','dict','http'and'https'.
Код Port::get() Port::get WP 7.0.3
public static function get($type) {
if (!is_string($type)) {
throw InvalidArgument::create(1, '$type', 'string', gettype($type));
}
$type = strtoupper($type);
if (!defined("self::{$type}")) {
$message = sprintf('Invalid port type (%s) passed', $type);
throw new Exception($message, 'portnotsupported');
}
return constant("self::{$type}");
}