API15

JApplication/stringURLSafe: Difference between revisions

From Joomla! Documentation

m removing red link to edit, no existant pages
m clean up
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


<span class="editsection" style="font-size:76%;">
 
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>


<! removed transcluded page call, red link never existed >
<! removed transcluded page call, red link never existed >
Line 45: Line 43:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
<! removed transcluded page call, red link never existed >
<! removed transcluded page call, red link never existed >



Revision as of 13:32, 24 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

<CodeExamplesForm />