JAuthentication/getInstance: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Returns the global authentication object, only creating it if it doesn't already exist.
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Descrip... |
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>[<! removed edit link to red link >]</nowiki> | ||
</span> | </span> | ||
<! removed transcluded page call, red link never existed > | |||
===Syntax=== | ===Syntax=== | ||
| Line 39: | Line 39: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[< | <nowiki>[<! removed edit link to red link >]</nowiki> | ||
</span> | </span> | ||
<! removed transcluded page call, red link never existed > | |||
===Examples=== | ===Examples=== | ||
| Line 54: | Line 54: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
[[Category:Archived pages API16]] | |||
Revision as of 02:50, 13 May 2013
Description
Returns the global authentication object, only creating it if it doesn't already exist.
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
static getInstance()
Returns
object The global object
Defined in
libraries/joomla/user/authentication.php
Importing
jimport( 'joomla.user.authentication' );
Source Body
public static function getInstance()
{
static $instances;
if (!isset ($instances)) {
$instances = array ();
}
if (empty ($instances[0])) {
$instances[0] = new JAuthentication();
}
return $instances[0];
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
<CodeExamplesForm />