RDBMapper Interface Reference
Detailed Description
RDBMapper defines the interface for mapper classes that map to relational databases.
Definition at line 24 of file RDBMapper.php.
Inheritance diagram for RDBMapper:Public Member Functions | |
| getConnection () | |
| getAdapter () | |
| getQuoteIdentifierSymbol () | |
| quoteIdentifier ($identifier) | |
| quoteValue ($value) | |
| getRealTableName () | |
| select (SelectStatement $selectStmt, PagingInfo $pagingInfo=null) | |
| constructOID ($data) | |
| renderCriteria (Criteria $criteria, $placeholder=null, $tableName=null, $columnName=null) | |
| loadObjectsFromSQL (SelectStatement $selectStmt, $buildDepth=BuildDepth::SINGLE, PagingInfo $pagingInfo=null, &$originalData=null) | |
Public Member Functions inherited from PersistenceMapper | |
| getType () | |
| getTypeDisplayName (Message $message) | |
| getTypeDescription (Message $message) | |
| getPkNames () | |
| getRelations ($hierarchyType='all') | |
| hasRelation ($roleName) | |
| getRelation ($roleName) | |
| getRelationsByType ($type) | |
| getAttributes (array $tags=[], $matchMode='all') | |
| hasAttribute ($name) | |
| getAttribute ($name) | |
| getAttributeDisplayName ($name, Message $message) | |
| getAttributeDescription ($name, Message $message) | |
| getReferences () | |
| getProperties () | |
| isSortable ($roleName=null) | |
| getSortkey ($roleName=null) | |
| getDefaultOrder ($roleName=null) | |
| load (ObjectId $oid, $buildDepth=BuildDepth::SINGLE) | |
| create ($type, $buildDepth=BuildDepth::SINGLE) | |
| save (PersistentObject $object) | |
| delete (PersistentObject $object) | |
| getOIDs ($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
| loadObjects ($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
| loadRelation (array $objects, $role, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
| executeOperation (PersistenceOperation $operation) | |
| beginTransaction () | |
| commitTransaction () | |
| rollbackTransaction () | |
| getStatements () | |
Member Function Documentation
◆ getConnection()
| getConnection | ( | ) |
◆ getAdapter()
| getAdapter | ( | ) |
Get the database adapter.
- Returns
- Laminas\Db\Adapter\AdapterInterface
Implemented in AbstractRDBMapper.
◆ getQuoteIdentifierSymbol()
| getQuoteIdentifierSymbol | ( | ) |
◆ quoteIdentifier()
| quoteIdentifier | ( | $identifier | ) |
Add quotation to a given identifier (like column name).
- Parameters
-
$identifier The identifier string
- Returns
- String
Implemented in AbstractRDBMapper.
◆ quoteValue()
| quoteValue | ( | $value | ) |
Add quotation to a given value.
- Parameters
-
$value The value
- Returns
- String
Implemented in AbstractRDBMapper.
◆ getRealTableName()
| getRealTableName | ( | ) |
◆ select()
| select | ( | SelectStatement | $selectStmt, |
| PagingInfo | $pagingInfo = null |
||
| ) |
Execute a select query on the connection.
- Parameters
-
$selectStmt A SelectStatement instance $pagingInfo An PagingInfo instance describing which page to load (optional, default: null)
- Returns
- An array as the result of PDOStatement::fetchAll(PDO::FETCH_ASSOC)
Implemented in AbstractRDBMapper.
◆ constructOID()
| constructOID | ( | $data | ) |
Construct an object id from given row data.
- Parameters
-
$data An associative array with the pk column names as keys and pk values as values
- Returns
- The oid
Implemented in AbstractRDBMapper.
◆ renderCriteria()
| renderCriteria | ( | Criteria | $criteria, |
$placeholder = null, |
|||
$tableName = null, |
|||
$columnName = null |
|||
| ) |
Render a Criteria instance as string.
- Parameters
-
$criteria The Criteria instance $placeholder Placeholder (':columnName', '?') used instead of the value (optional, default: null) $tableName The table name to use (may differ from criteria's type attribute) (optional) $columnName The column name to use (may differ from criteria's attribute attribute) (optional)
- Returns
- Array with condition (string) and placeholder (string)
Implemented in AbstractRDBMapper.
◆ loadObjectsFromSQL()
| loadObjectsFromSQL | ( | SelectStatement | $selectStmt, |
$buildDepth = BuildDepth::SINGLE, |
|||
| PagingInfo | $pagingInfo = null, |
||
| & | $originalData = null |
||
| ) |
Load objects defined by a select statement.
- Parameters
-
$selectStmt A SelectStatement instance $buildDepth One of the BUILDDEPTH constants or a number describing the number of generations to build (except BuildDepth::REQUIRED, BuildDepth::PROXIES_ONLY) (default: BuildDepth::SINGLE) $pagingInfo A reference PagingInfo instance (optional, default: null) $originalData A reference that will receive the original database data (optional)
- Returns
- Array of PersistentObject instances
Implemented in AbstractRDBMapper.