\JAdapter
Adapter Class Retains common adapter pattern functions Class harvested from joomla.installer.installer
Synopsis
class JAdapter
extends JObject
{
- // members
- protected $_adapters;
- protected $_adapterfolder;
- protected $_classprefix;
- protected $_basepath;
- protected JDatabaseDriver $_db;
- // Inherited members from JObject
- protected $_errors;
- // methods
- public void __construct()
- public JDatabaseDriver getDBO()
- public boolean setAdapter()
- public getAdapter()
- public void loadAllAdapters()
- // Inherited methods from JObject
- public void __construct()
- public string __toString()
- public mixed def()
- public mixed get()
- public array getProperties()
- public string getError()
- public array getErrors()
- public mixed set()
- public boolean setProperties()
- public void setError()
Hierarchy
Members
protected
- $_adapterfolder
—
string
Adapter Folder - $_adapters
—
array
Associative array of adapters - $_basepath
—
string
Base Path for the adapter instance - $_classprefix — string
- $_db
—
JDatabaseDriver
Database Connector Object - $_errors
—
array
An array of error messages or Exception objects.
Methods
public
- __construct() — Constructor
- getAdapter() — Return an adapter.
- getDBO() — Get the database connector object
- loadAllAdapters() — Loads all adapters.
- setAdapter() — Set an adapter by name
Inherited from JObject
public
- __toString() — Magic method to convert the object to a string gracefully.
- def() — Sets a default value if not alreay assigned
- get() — Returns a property of the object or the default value if the property is not set.
- getError() — Get the most recent error message.
- getErrors() — Return all errors, if any.
- getProperties() — Returns an associative array of object properties.
- set() — Modifies a property of the object, creating it if it does not already exist.
- setError() — Add an error message.
- setProperties() — Set the object properties based on a named array/hash.