DatabaseAwareTrait

Defines the trait for a Database Aware Class.

since

2.1.0

package

Joomla Framework

Methods

getDatabase

Get the database.

getDatabase() : \Joomla\Database\DatabaseInterface
since

2.1.0

throws

\Joomla\Database\Exception\DatabaseNotFoundExceptionMay be thrown if the database has not been set.

Response

\Joomla\Database\DatabaseInterface

setDatabase

Set the database.

setDatabase(\Joomla\Database\DatabaseInterface db) : void
since

2.1.0

Arguments

db

\Joomla\Database\DatabaseInterfaceThe database.

Properties

databaseAwareTraitDatabase

Database

since

2.1.0

Type(s)

\Joomla\Database\DatabaseInterface