编辑:Port.php
<?php /** * Port utilities for Requests * * @package Requests\Utilities * @since 2.0.0 */ namespace WpOrg\Requests; use WpOrg\Requests\Exception; use WpOrg\Requests\Exception\InvalidArgument; /** * Find the correct port depending on the Request type. * * @package Requests\Utilities * @since 2.0.0 */ final class Port { /** * Port to use with Acap requests. * * @var int */ const ACAP = 674; /** * Port to use with Dictionary requests. * * @var int */ const DICT = 2628; /** * Port to use with HTTP requests. * * @var int */ const HTTP = 80; /** * Port to use with HTTP over SSL requests. * * @var int */ const HTTPS = 443; /** * Retrieve the port number to use. * * @param string $type Request type. * The following requests types are supported: * 'acap', 'dict', 'http' and 'https'. * * @return int * * @throws \WpOrg\Requests\Exception\InvalidArgument When a non-string input has been passed. * @throws \WpOrg\Requests\Exception When a non-supported port is requested ('portnotsupported'). */ 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}"); } }
保存文件
位置:
home
/
fembzvrs
/
zimeza.com
/
wp-includes
/
Requests
/
src
批量上传
创建
创建
批量权限
批量删除
名称
权限
大小
修改时间
操作
↑ 返回上级
-
-
-
-
Auth
drwxr-xr-x
-
2025-12-21 04:18
权限
删除
重命名
Cookie
drwxr-xr-x
-
2025-07-06 02:11
权限
删除
重命名
Exception
drwxr-xr-x
-
2026-05-14 04:25
权限
删除
重命名
Proxy
drwxr-xr-x
-
2025-12-21 04:18
权限
删除
重命名
Response
drwxr-xr-x
-
2025-12-21 04:18
权限
删除
重命名
Transport
drwxr-xr-x
-
2025-12-21 04:18
权限
删除
重命名
Autoload.php
-rw-r--r--
9.12 KB
2023-04-05 17:12
编辑
下载
权限
删除
重命名
Capability.php
-rw-r--r--
652 B
2023-04-05 17:12
编辑
下载
权限
删除
重命名
Cookie.php
-rw-r--r--
15.03 KB
2024-03-25 16:23
编辑
下载
权限
删除
重命名
Hooks.php
-rw-r--r--
2.96 KB
2023-10-12 16:34
编辑
下载
权限
删除
重命名
Ipv6.php
-rw-r--r--
5.51 KB
2022-12-16 02:32
编辑
下载
权限
删除
重命名
Iri.php
-rw-r--r--
28.93 KB
2023-10-12 16:34
编辑
下载
权限
删除
重命名
Port.php
-rw-r--r--
1.47 KB
2022-12-16 02:32
编辑
下载
权限
删除
重命名
Proxy.php
-rw-r--r--
867 B
2022-12-16 02:32
编辑
下载
权限
删除
重命名
Requests.php
-rw-r--r--
33.2 KB
2024-03-25 16:23
编辑
下载
权限
删除
重命名
Session.php
-rw-r--r--
8.89 KB
2023-10-12 16:34
编辑
下载
权限
删除
重命名
Ssl.php
-rw-r--r--
5.3 KB
2022-12-16 02:32
编辑
下载
权限
删除
重命名
Transport.php
-rw-r--r--
1.51 KB
2022-12-16 02:32
编辑
下载
权限
删除
重命名
error_log
-rw-r--r--
75.41 KB
2026-05-14 03:05
编辑
下载
权限
删除
重命名