MapperRegistry
in package
implements
DataProvider
Uses
Log
Interfaces, Classes, Traits and Enums
Table of Contents
- $dbc : mysqli
- 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 appendin Mapper is instantiated. e.g. \VeruA\DomainObject\Client instantiates \VeruA\DataMapper\ClientMapper
- __construct() : mixed
Properties
$dbc
protected
mysqli
$dbc
database connection object
Methods
getInstance()
Returns the single instance of the MapperRegistry
public
static getInstance() : MapperRegistry
Return values
MapperRegistry —init()
public
static init(mysqli $dbc) : mixed
Parameters
- $dbc : mysqli
Return values
mixed —load()
Populates a DomainObject's data using the correct Mapper
public
load(DomainObject $dmo) : void
Parameters
- $dmo : DomainObject
Return values
void —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 appendin 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