at path:
ROOT
/
wp-includes__b72ff91
/
Requests
/
src
/
Port.php
run:
R
W
Run
Auth
DIR
2026-02-09 05:48:12
R
W
Run
Cookie
DIR
2026-02-09 05:48:12
R
W
Run
Exception
DIR
2026-02-09 05:48:12
R
W
Run
Proxy
DIR
2026-02-09 05:48:12
R
W
Run
Response
DIR
2026-02-09 05:48:12
R
W
Run
Transport
DIR
2026-02-09 05:48:12
R
W
Run
Utility
DIR
2026-02-09 05:48:12
R
W
Run
.htaccess
420 By
2026-02-09 05:48:12
R
W
Run
Delete
Rename
Auth.php
860 By
2022-12-16 02:32:18
R
W
Run
Delete
Rename
Autoload.php
9.12 KB
2023-04-05 17:12:26
R
W
Run
Delete
Rename
Capability.php
652 By
2023-04-05 17:12:26
R
W
Run
Delete
Rename
Cookie.php
15.03 KB
2024-03-25 16:23:08
R
W
Run
Delete
Rename
Exception.php
1.09 KB
2022-12-16 02:32:18
R
W
Run
Delete
Rename
HookManager.php
709 By
2022-12-16 02:32:18
R
W
Run
Delete
Rename
Hooks.php
2.96 KB
2023-10-12 16:34:34
R
W
Run
Delete
Rename
IdnaEncoder.php
12.14 KB
2023-04-05 17:12:26
R
W
Run
Delete
Rename
Ipv6.php
5.51 KB
2022-12-16 02:32:18
R
W
Run
Delete
Rename
Iri.php
28.93 KB
2023-10-12 16:34:34
R
W
Run
Delete
Rename
Port.php
1.47 KB
2022-12-16 02:32:18
R
W
Run
Delete
Rename
Proxy.php
867 By
2022-12-16 02:32:18
R
W
Run
Delete
Rename
Requests.php
33.2 KB
2024-03-25 16:23:08
R
W
Run
Delete
Rename
Response.php
4.18 KB
2023-04-05 17:12:26
R
W
Run
Delete
Rename
Session.php
8.89 KB
2023-10-12 16:34:34
R
W
Run
Delete
Rename
Ssl.php
5.3 KB
2022-12-16 02:32:18
R
W
Run
Delete
Rename
Transport.php
1.51 KB
2022-12-16 02:32:18
R
W
Run
Delete
Rename
error_log
286 By
2025-12-18 07:09:04
R
W
Run
Delete
Rename
error_log
up
📄
Port.php
Save
<?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}"); } }