class JAdapter extends JObject

Adapter Class Retains common adapter pattern functions Class harvested from joomla.installer.installer

Methods

__construct( string $basepath, string $classprefix = null, string $adapterfolder = null)

Constructor

getDbo()

Get the database connector object

getAdapter( string $name, array $options = array())

Return an adapter.

boolean
setAdapter( string $name, object $adapter = null, array $options = array())

Set an adapter by name

void
loadAllAdapters( array $options = array())

Loads all adapters.

Details

__construct( string $basepath, string $classprefix = null, string $adapterfolder = null)

Constructor

Parameters

string $basepath Base Path of the adapters
string $classprefix Class prefix of adapters
string $adapterfolder Name of folder to append to base path

JDatabaseDriver getDbo()

Get the database connector object

Return Value

JDatabaseDriver Database connector object

JAdapterInstance|boolean getAdapter( string $name, array $options = array())

Return an adapter.

Parameters

string $name Name of adapter to return
array $options Adapter options

Return Value

JAdapterInstance|boolean Adapter of type 'name' or false

boolean setAdapter( string $name, object $adapter = null, array $options = array())

Set an adapter by name

Parameters

string $name Adapter name
object $adapter &$adapter Adapter object
array $options Adapter options

Return Value

boolean True if successful

void loadAllAdapters( array $options = array())

Loads all adapters.

Parameters

array $options Adapter options

Return Value

void