REDROOM
PHP 8.1.33
Path:
Logout
Edit File
Size: 969 B
Close
/home/jambtst2015/public_html/ida.com.ng/libraries/vendor/algo26-matthias/idna-convert/src/ToUnicode.php
Text
Base64
<?php namespace Algo26\IdnaConvert; use Algo26\IdnaConvert\Punycode\FromPunycode; use Algo26\IdnaConvert\TranscodeUnicode\TranscodeUnicode; class ToUnicode extends AbstractIdnaConvert implements IdnaConvertInterface { /** @var TranscodeUnicode */ private $unicodeTransCoder; /** @var FromPunycode */ private $punycodeEncoder; public function __construct() { $this->unicodeTransCoder = new TranscodeUnicode(); $this->punycodeEncoder = new FromPunycode(); } public function convert(string $host): string { // Drop any whitespace around $input = trim($host); $hostLabels = explode('.', $input); foreach ($hostLabels as $index => $label) { $return = $this->punycodeEncoder->convert($label); if (!$return) { $return = $label; } $hostLabels[$index] = $return; } return implode('.', $hostLabels); } }
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).