JApplication/stringURLSafe: Difference between revisions
From Joomla! Documentation
New page: ===Description===
This method transliterates a string into an URL safe string or returns a URL safe UTF-8 string based on the global configuration
<span class="editsection" style="font-... |
m preparing for archive only |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
This method transliterates a string into an URL safe string or returns a URL safe UTF-8 string based on the global configuration | This method transliterates a string into an URL safe string or returns a URL safe UTF-8 string based on the global configuration | ||
<! removed transcluded page call, red link never existed > | |||
===Syntax=== | ===Syntax=== | ||
| Line 45: | Line 43: | ||
</source> | </source> | ||
<! removed transcluded page call, red link never existed > | |||
< | |||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=stringURLSafe | category=stringURLSafe | ||
category=JApplication | category=JApplication | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
[[Category:Archived pages API15]] | |||
Latest revision as of 00:17, 25 March 2017
Description
This method transliterates a string into an URL safe string or returns a URL safe UTF-8 string based on the global configuration
<! removed transcluded page call, red link never existed >
Syntax
static stringURLSafe($string)
| Parameter Name | Default Value | Description |
|---|---|---|
| $string | $input String to process |
Returns
string Processed string
Defined in
libraries/joomla/application/application.php
Importing
jimport( 'joomla.application.application' );
Source Body
static public function stringURLSafe($string)
{
$app = &JFactory::getApplication();
if (self::getCfg('unicodeslugs') == 1)
{
$output = JFilterOutput::stringURLUnicodeSlug($string);
} else {
$output = JFilterOutput::stringURLSafe($string);
}
return $output;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples