API15

JApplication/getRouter: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
No edit summary
m removing red link to edit, no existant pages
Line 3: Line 3:


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


{{Description:JApplication/getRouter}}
<! removed transcluded page call, red link never existed >


===Syntax===
===Syntax===
Line 53: Line 53:


<span class="editsection" style="font-size:76%;">
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JApplication/getRouter|Edit See Also]]<nowiki>]</nowiki>
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
</span>
{{SeeAlso:JApplication/getRouter}}
<! removed transcluded page call, red link never existed >


===Examples===
===Examples===
Line 68: Line 68:
  format= ,,,
  format= ,,,
</dpl>
</dpl>
[[Category:Archived pages API15]]

Revision as of 13:33, 12 May 2013

Description

Return a reference to the application JRouter object.

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

& getRouter($name=null, $options=array())
Parameter Name Default Value Description
$name null $options An optional associative array of configuration settings.
$options array()

Returns

.

Defined in

libraries/joomla/application/application.php

Importing

jimport( 'joomla.application.application' );

Source Body

function &getRouter($name = null, $options = array())
{
        if(!isset($name)) {
                $name = $this->_name;
        }

        jimport( 'joomla.application.router' );
        $router =& JRouter::getInstance($name, $options);
        if (JError::isError($router)) {
                $null = null;
                return $null;
        }
        return $router;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />