MapperRegistry
in package
implements
DataProvider
uses
Log
Table of Contents
Interfaces
Properties
- $dbc : The
Methods
- getInstance() : MapperRegistry
- Returns the single instance of the MapperRegistry
- init() : mixed
- load() : void
- Populates a DomainObject's data using the correct Mapper
- mapper() : Mapper
- Returns a Mapper for a DomainObject class If no Mapper is related in the constructor a Mapper with the same name as the DomainObject append in Mapper is instantiated. e.g. \VeruA\DomainObject\Client instantiates \VeruA\DataMapper\ClientMapper
- __construct() : mixed
Properties
$dbc
protected
The
$dbc
database connection object
Methods
getInstance()
Returns the single instance of the MapperRegistry
public
static getInstance() : MapperRegistry
Return values
MapperRegistryinit()
public
static init(mysqli $dbc) : mixed
Parameters
- $dbc : mysqli
load()
Populates a DomainObject's data using the correct Mapper
public
load(DomainObject $dmo) : void
Parameters
- $dmo : DomainObject
mapper()
Returns a Mapper for a DomainObject class If no Mapper is related in the constructor a Mapper with the same name as the DomainObject append in Mapper is instantiated. e.g. \VeruA\DomainObject\Client instantiates \VeruA\DataMapper\ClientMapper
public
static mapper(string $class) : Mapper
Parameters
- $class : string
Tags
Return values
Mapper__construct()
protected
__construct(mysqli $dbc) : mixed
Parameters
- $dbc : mysqli