Elgg  Version 2.3
Public Member Functions | List of all members
Elgg\Application\Database Class Reference
Inheritance diagram for Elgg\Application\Database:
Elgg\Database

Public Member Functions

 __construct (ElggDb $db)
 Constructor. More...
 
 getData ($query, $callback= '', array $params=[])
 {} More...
 
 getDataRow ($query, $callback= '', array $params=[])
 {} More...
 
 insertData ($query, array $params=[])
 {} More...
 
 updateData ($query, $getNumRows=false, array $params=[])
 {} More...
 
 deleteData ($query, array $params=[])
 {} More...
 
 getTablePrefix ()
 {} More...
 
 sanitizeInt ($value, $signed=true)
 {} More...
 
 sanitizeString ($value)
 {} More...
 
 __get ($name)
 Handle magic property reads. More...
 
 __set ($name, $value)
 Handle magic property writes. More...
 
 fingerprintCallback ($callback)
 {} More...
 
 setTimer (Timer $timer)
 {} More...
 
 setLogger (Logger $logger)
 {} More...
 
 setupConnections ()
 {} More...
 
 connect ($type="readwrite")
 {} More...
 
 runSqlScript ($scriptlocation)
 {} More...
 
 registerDelayedQuery ($query, $type, $handler="", array $params=[])
 {} More...
 
 executeDelayedQueries ()
 {} More...
 
 enableQueryCache ()
 {} More...
 
 disableQueryCache ()
 {} More...
 
 assertInstalled ()
 {} More...
 
 getQueryCount ()
 {} More...
 
 getServerVersion ($type)
 {} More...
 
- Public Member Functions inherited from Elgg\Database
 __construct (\Elgg\Database\Config $config,\Elgg\Logger $logger=null)
 Constructor. More...
 
 setLogger (Logger $logger)
 Set the logger object. More...
 
 setupConnections ()
 Establish database connections. More...
 
 connect ($type="readwrite")
 Establish a connection to the database server. More...
 
 getData ($query, $callback=null, array $params=[])
 Retrieve rows from the database. More...
 
 getDataRow ($query, $callback=null, array $params=[])
 Retrieve a single row from the database. More...
 
 insertData ($query, array $params=[])
 Insert a row into the database. More...
 
 updateData ($query, $get_num_rows=false, array $params=[])
 Update the database. More...
 
 deleteData ($query, array $params=[])
 Delete data from the database. More...
 
 fingerprintCallback ($callback)
 Get a string that uniquely identifies a callback during the current request. More...
 
 runSqlScript ($scriptlocation)
 Runs a full database script from disk. More...
 
 registerDelayedQuery ($query, $type, $callback=null, array $params=[])
 Queue a query for execution upon shutdown. More...
 
 executeDelayedQueries ()
 Trigger all queries that were registered as "delayed" queries. More...
 
 enableQueryCache ()
 Enable the query cache. More...
 
 disableQueryCache ()
 Disable the query cache. More...
 
 assertInstalled ()
 Test that the Elgg database is installed. More...
 
 getQueryCount ()
 Get the number of queries made to the database. More...
 
 getTablePrefix ()
 Get the value of the "prefix" property. More...
 
 sanitizeInt ($value, $signed=true)
 Sanitizes an integer value for use in a query. More...
 
 sanitizeString ($value)
 Sanitizes a string for use in a query. More...
 
 getServerVersion ($type)
 Get the server version number. More...
 
 __get ($name)
 Handle magic property reads. More...
 
 __set ($name, $value)
 Handle magic property writes. More...
 

Additional Inherited Members

- Public Attributes inherited from Elgg\Database
const DELAYED_QUERY = 'q'
 
const DELAYED_TYPE = 't'
 
const DELAYED_HANDLER = 'h'
 
const DELAYED_PARAMS = 'p'
 
- Protected Member Functions inherited from Elgg\Database
 getConnection ($type)
 Gets (if required, also creates) a DB connection. More...
 
 getResults ($query, $callback=null, $single=false, array $params=[])
 Handles queries that return results, running the results through a an optional callback function. More...
 
 executeQuery ($query, Connection $connection, array $params=[])
 Execute a query. More...
 
 invalidateQueryCache ()
 Invalidate the query cache. More...
 

Detailed Description

Definition at line 22 of file Database.php.

Constructor & Destructor Documentation

Elgg\Application\Database::__construct ( ElggDb  $db)

Constructor.

Parameters
ElggDb$dbThe Elgg database private

Definition at line 37 of file Database.php.

Member Function Documentation

Elgg\Application\Database::__get (   $name)

Handle magic property reads.

Parameters
string$nameProperty name
Returns
mixed

Definition at line 107 of file Database.php.

Elgg\Application\Database::__set (   $name,
  $value 
)

Handle magic property writes.

Parameters
string$nameProperty name
mixed$valueValue
Returns
void

Definition at line 122 of file Database.php.

Elgg\Application\Database::assertInstalled ( )

{}

Definition at line 231 of file Database.php.

Elgg\Application\Database::connect (   $type = "readwrite")

{}

Definition at line 171 of file Database.php.

Elgg\Application\Database::deleteData (   $query,
array  $params = [] 
)

{}

Definition at line 72 of file Database.php.

Elgg\Application\Database::disableQueryCache ( )

{}

Definition at line 221 of file Database.php.

Elgg\Application\Database::enableQueryCache ( )

{}

Definition at line 211 of file Database.php.

Elgg\Application\Database::executeDelayedQueries ( )

{}

Definition at line 201 of file Database.php.

Elgg\Application\Database::fingerprintCallback (   $callback)

{}

Definition at line 131 of file Database.php.

Elgg\Application\Database::getData (   $query,
  $callback = '',
array  $params = [] 
)

{}

Definition at line 44 of file Database.php.

Elgg\Application\Database::getDataRow (   $query,
  $callback = '',
array  $params = [] 
)

{}

Definition at line 51 of file Database.php.

Elgg\Application\Database::getQueryCount ( )

{}

Definition at line 241 of file Database.php.

Elgg\Application\Database::getServerVersion (   $type)

{}

Definition at line 251 of file Database.php.

Elgg\Application\Database::getTablePrefix ( )

{}

Definition at line 80 of file Database.php.

Elgg\Application\Database::insertData (   $query,
array  $params = [] 
)

{}

Definition at line 58 of file Database.php.

Elgg\Application\Database::registerDelayedQuery (   $query,
  $type,
  $handler = "",
array  $params = [] 
)

{}

Definition at line 191 of file Database.php.

Elgg\Application\Database::runSqlScript (   $scriptlocation)

{}

Definition at line 181 of file Database.php.

Elgg\Application\Database::sanitizeInt (   $value,
  $signed = true 
)

{}

Definition at line 90 of file Database.php.

Elgg\Application\Database::sanitizeString (   $value)

{}

Definition at line 97 of file Database.php.

Elgg\Application\Database::setLogger ( Logger  $logger)

{}

Definition at line 151 of file Database.php.

Elgg\Application\Database::setTimer ( Timer  $timer)

{}

Definition at line 141 of file Database.php.

Elgg\Application\Database::setupConnections ( )

{}

Definition at line 161 of file Database.php.

Elgg\Application\Database::updateData (   $query,
  $getNumRows = false,
array  $params = [] 
)

{}

Definition at line 65 of file Database.php.


The documentation for this class was generated from the following file: