PHP Class RedBeanPHP\ToolBox

The toolbox is an integral part of RedBeanPHP providing the basic architectural building blocks to manager objects, helpers and additional tools like plugins. A toolbox contains the three core components of RedBeanPHP: the adapter, the query writer and the core functionality of RedBeanPHP in OODB.
Author: Gabor de Mooij and the RedBeanPHP community
Afficher le fichier Open project: gabordemooij/redbean Class Usage Examples

Protected Properties

Свойство Type Description
$adapter RedBeanPHP\Adapter\DBAdapter
$oodb RedBeanPHP\OODB
$writer RedBeanPHP\QueryWriter

Méthodes publiques

Méthode Description
__construct ( RedBeanPHP\OODB $oodb, RedBeanPHP\Adapter $adapter, RedBeanPHP\QueryWriter $writer ) Constructor.
getDatabaseAdapter ( ) : DBAdapter Returns the database adapter in this toolbox.
getRedBean ( ) : RedBeanPHP\OODB Returns the OODB instance in this toolbox.
getWriter ( ) : RedBeanPHP\QueryWriter Returns the query writer in this toolbox.

Method Details

__construct() public méthode

The toolbox is an integral part of RedBeanPHP providing the basic architectural building blocks to manager objects, helpers and additional tools like plugins. A toolbox contains the three core components of RedBeanPHP: the adapter, the query writer and the core functionality of RedBeanPHP in OODB.
public __construct ( RedBeanPHP\OODB $oodb, RedBeanPHP\Adapter $adapter, RedBeanPHP\QueryWriter $writer )
$oodb RedBeanPHP\OODB Object Database, OODB
$adapter RedBeanPHP\Adapter Database Adapter
$writer RedBeanPHP\QueryWriter Query Writer

getDatabaseAdapter() public méthode

The adapter is responsible for executing the query and binding the values. The adapter also takes care of transaction handling.
public getDatabaseAdapter ( ) : DBAdapter
Résultat RedBeanPHP\Adapter\DBAdapter

getRedBean() public méthode

OODB is responsible for creating, storing, retrieving and deleting single beans. Other components rely on OODB for their basic functionality.
public getRedBean ( ) : RedBeanPHP\OODB
Résultat RedBeanPHP\OODB

getWriter() public méthode

The Query Writer is responsible for building the queries for a specific database and executing them through the adapter.
public getWriter ( ) : RedBeanPHP\QueryWriter
Résultat RedBeanPHP\QueryWriter

Property Details

$adapter protected_oe property

protected DBAdapter,RedBeanPHP\Adapter $adapter
Résultat RedBeanPHP\Adapter\DBAdapter

$oodb protected_oe property

protected OODB,RedBeanPHP $oodb
Résultat RedBeanPHP\OODB

$writer protected_oe property

protected QueryWriter,RedBeanPHP $writer
Résultat RedBeanPHP\QueryWriter