1 <?php
2 /**
3 * @package Joomla.Platform
4 * @subpackage String
5 *
6 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE
8 */
9
10 defined('JPATH_PLATFORM') or die;
11
12 /**
13 * Wrapper class for JStringNormalise
14 *
15 * @package Joomla.Platform
16 * @subpackage String
17 * @since 3.4
18 */
19 class JStringWrapperNormalise
20 {
21 /**
22 * Helper wrapper method for fromCamelCase
23 *
24 * @param string $input The string input (ASCII only).
25 * @param boolean $grouped Optionally allows splitting on groups of uppercase characters.
26 *
27 * @return mixed The space separated string or an array of substrings if grouped is true.
28 *
29 * @see JUserHelper::fromCamelCase()
30 * @since 3.4
31 */
32 public function fromCamelCase($input, $grouped = false)
33 {
34 return JStringNormalise::fromCamelCase($input, $grouped);
35 }
36
37 /**
38 * Helper wrapper method for toCamelCase
39 *
40 * @param string $input The string input (ASCII only).
41 *
42 * @return string The camel case string.
43 *
44 * @see JUserHelper::toCamelCase()
45 * @since 3.4
46 */
47 public function toCamelCase($input)
48 {
49 return JStringNormalise::toCamelCase($input);
50 }
51
52 /**
53 * Helper wrapper method for toDashSeparated
54 *
55 * @param string $input The string input (ASCII only).
56 *
57 * @return string The dash separated string.
58 *
59 * @see JUserHelper::toDashSeparated()
60 * @since 3.4
61 */
62 public function toDashSeparated($input)
63 {
64 return JStringNormalise::toDashSeparated($input);
65 }
66
67 /**
68 * Helper wrapper method for toSpaceSeparated
69 *
70 * @param string $input The string input (ASCII only).
71 *
72 * @return string The space separated string.
73 *
74 * @see JUserHelper::toSpaceSeparated()
75 * @since 3.4
76 */
77 public function toSpaceSeparated($input)
78 {
79 return JStringNormalise::toSpaceSeparated($input);
80 }
81
82 /**
83 * Helper wrapper method for toUnderscoreSeparated
84 *
85 * @param string $input The string input (ASCII only).
86 *
87 * @return string The underscore separated string.
88 *
89 * @see JUserHelper::toUnderscoreSeparated()
90 * @since 3.4
91 */
92 public function toUnderscoreSeparated($input)
93 {
94 return JStringNormalise::toUnderscoreSeparated($input);
95 }
96
97 /**
98 * Helper wrapper method for toVariable
99 *
100 * @param string $input The string input (ASCII only).
101 *
102 * @return string The variable string.
103 *
104 * @see JUserHelper::toVariable()
105 * @since 3.4
106 */
107 public function toVariable($input)
108 {
109 return JStringNormalise::toVariable($input);
110 }
111
112 /**
113 * Helper wrapper method for toKey
114 *
115 * @param string $input The string input (ASCII only).
116 *
117 * @return string The key string.
118 *
119 * @see JUserHelper::toKey()
120 * @since 3.4
121 */
122 public function toKey($input)
123 {
124 return JStringNormalise::toKey($input);
125 }
126 }
127