Actions

API17

Difference between revisions of "JDatabase::getInstance"

From Joomla! Documentation

(Bulk upload by Doxiki2)
 
(Updated to r1448:247ba8d88526)
(One intermediate revision by one user not shown)
Line 2: Line 2:
 
=={{JVer|11.1}} JDatabase::getInstance==
 
=={{JVer|11.1}} JDatabase::getInstance==
 
===Description===
 
===Description===
Returns the global Database object, only creating it if it doesn't already exist.  
+
Method to return a  instance based on the given options.  
  
 
{{Description:JDatabase::getInstance}}
 
{{Description:JDatabase::getInstance}}
Line 8: Line 8:
 
<nowiki>[</nowiki>[[Description:JDatabase::getInstance|Edit Descripton]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[Description:JDatabase::getInstance|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
</span>
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public static JDatabase::getInstance ($options=array())
+
public static function getInstance ($options=array())
 
</source>
 
</source>
 
{| class="wikitable"
 
{| class="wikitable"
Line 25: Line 24:
 
|-
 
|-
 
|}
 
|}
===Returns===
+
* '''Returns'''
 
+
* '''Defined''' on line 270 of libraries/joomla/database/database.php
===Defined in===
+
* '''Referenced by'''
libraries/joomla/database/database.php
+
** [[JLoggerDatabase::connect/11.1|JLoggerDatabase::connect]]
===Referenced by===
+
* [[JLoggerDatabase/connect/11.1|JLoggerDatabase::connect]]
+
 
===See also===
 
===See also===
 +
* {{JVer|11.1}} '''JDatabase::getInstance source code''' on [[jplatform:database/database.php#cl-262|BitBucket]]
 +
* {{JVer|11.1}} Class [[JDatabase/11.1|JDatabase]]
 +
* {{JVer|11.1}} Subpackage [[Subpackage_Database/11.1|Database]]
 +
* [[JDatabase::getInstance|Other versions of JDatabase::getInstance]]
 +
{{SeeAlso:JDatabase::getInstance}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JDatabase::getInstance|Edit See Also]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[SeeAlso:JDatabase::getInstance|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
</span>
* [[JDatabase/11.1|JDatabase]]
+
===User contributed notes===
* [[JDatabase::getInstance|Other versions of this method]]
+
{{SeeAlso:JDatabase::getInstance}}
+
===Examples===
+
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 46: Line 45:
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
 
<noinclude>[[Category:JDatabase]][[Category:JDatabase::getInstance]]</noinclude>
 
<noinclude>[[Category:JDatabase]][[Category:JDatabase::getInstance]]</noinclude>

Revision as of 20:25, 27 April 2011

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Joomla 11.1 JDatabase::getInstance

Description

Method to return a instance based on the given options.

Description:JDatabase::getInstance [Edit Descripton]

public static function getInstance ($options=array())
Parameter Type Default Description
$options array()

See also

SeeAlso:JDatabase::getInstance [Edit See Also]

User contributed notes

<CodeExamplesForm />