punycode.php
2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
/**
* @package Joomla.Platform
* @subpackage String
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
JLoader::register('idna_convert', JPATH_LIBRARIES . '/idna_convert/idna_convert.class.php');
/**
* Wrapper class for JStringPunycode
*
* @package Joomla.Platform
* @subpackage String
* @since 3.4
* @deprecated 4.0 Will be removed without replacement
*/
class JStringWrapperPunycode
{
/**
* Helper wrapper method for toPunycode
*
* @param string $utfString The UTF-8 string to transform.
*
* @return string The punycode string.
*
* @see JUserHelper::toPunycode()
* @since 3.4
*/
public function toPunycode($utfString)
{
return JStringPunycode::toPunycode($utfString);
}
/**
* Helper wrapper method for fromPunycode
*
* @param string $punycodeString The Punycode string to transform.
*
* @return string The UF-8 URL.
*
* @see JUserHelper::fromPunycode()
* @since 3.4
*/
public function fromPunycode($punycodeString)
{
return JStringPunycode::fromPunycode($punycodeString);
}
/**
* Helper wrapper method for urlToPunycode
*
* @param string $uri The UTF-8 URL to transform.
*
* @return string The punycode URL.
*
* @see JUserHelper::urlToPunycode()
* @since 3.4
*/
public function urlToPunycode($uri)
{
return JStringPunycode::urlToPunycode($uri);
}
/**
* Helper wrapper method for urlToUTF8
*
* @param string $uri The Punycode URL to transform.
*
* @return string The UTF-8 URL.
*
* @see JStringPunycode::urlToUTF8()
* @since 3.4
*/
public function urlToUTF8($uri)
{
return JStringPunycode::urlToUTF8($uri);
}
/**
* Helper wrapper method for emailToPunycode
*
* @param string $email The UTF-8 email to transform.
*
* @return string The punycode email.
*
* @see JStringPunycode::emailToPunycode()
* @since 3.4
*/
public function emailToPunycode($email)
{
return JStringPunycode::emailToPunycode($email);
}
/**
* Helper wrapper method for emailToUTF8
*
* @param string $email The punycode email to transform.
*
* @return string The punycode email.
*
* @see JStringPunycode::emailToUTF8()
* @since 3.4
*/
public function emailToUTF8($email)
{
return JStringPunycode::emailToUTF8($email);
}
}