REDROOM
PHP 8.1.33
Path:
Logout
Edit File
Size: 1.18 KB
Close
/home/jambtst2015/public_html/ida.com.ng/libraries/vendor/algo26-matthias/idna-convert/src/AbstractIdnaConvert.php
Text
Base64
<?php namespace Algo26\IdnaConvert; use InvalidArgumentException; abstract class AbstractIdnaConvert { abstract public function convert(string $host): string; /** * @param string $emailAddress * * @return string */ public function convertEmailAddress(string $emailAddress): string { if (strpos($emailAddress, '@') === false) { throw new InvalidArgumentException('The given string does not look like an email address', 206); } $parts = explode('@', $emailAddress); return sprintf( '%s@%s', $parts[0], $this->convert($parts[1]) ); } /** * @param string $url * * @return string */ public function convertUrl(string $url): string { $parsed = parse_url($url); if ($parsed === false) { throw new InvalidArgumentException('The given string does not look like a URL', 206); } // Nothing to do if (!isset($parsed['host']) || $parsed['host'] === null) { return $url; } $parsed['host'] = $this->convert($parsed['host']); return http_build_url($parsed); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 5 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
EncodingHelper
DIR
-
drwxr-xr-x
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Exception
DIR
-
drwxr-xr-x
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NamePrep
DIR
-
drwxr-xr-x
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Punycode
DIR
-
drwxr-xr-x
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TranscodeUnicode
DIR
-
drwxr-xr-x
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AbstractIdnaConvert.php
1.18 KB
lrw-r--r--
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
IdnaConvertInterface.php
249 B
lrw-r--r--
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ToIdn.php
1.94 KB
lrw-r--r--
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ToUnicode.php
969 B
lrw-r--r--
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).