PdoDataMapper
- Full name:
\Qubus\Expressive\DataMapper\PdoDataMapper - This class implements:
\Qubus\Expressive\DataMapper\DataMapper
Properties
entity
table
columns
properties
connection
Methods
__construct
Parameters:
| Parameter | Type | Description |
|---|---|---|
$connection | \Qubus\Expressive\Connection | |
$entity | string |
Throws:
getPdo
queryBuilder
hydrate
public hydrate(list<array<string,mixed>> $data): array<int|string,\Qubus\Expressive\DataMapper\SerializableEntity>
Parameters:
| Parameter | Type | Description |
|---|---|---|
$data | list |
Throws:
findAll
public findAll(string $orderBy = '', array{direction?: string, limit?: int, offset?: int} $options = []): array<int|string,\Qubus\Expressive\DataMapper\SerializableEntity>
Parameters:
| Parameter | Type | Description |
|---|---|---|
$orderBy | string | |
$options | array{direction?: string, limit?: int, offset?: int} |
Throws:
findAllBy
public findAllBy(string $column, string $value, string $orderBy = '', array{direction?: string, limit?: int, offset?: int} $options = []): array<int|string,\Qubus\Expressive\DataMapper\SerializableEntity>
Parameters:
| Parameter | Type | Description |
|---|---|---|
$column | string | |
$value | string | |
$orderBy | string | |
$options | array{direction?: string, limit?: int, offset?: int} |
Throws:
findOne
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id | int|string |
Throws:
create
public create(\Qubus\Expressive\DataMapper\SerializableEntity $entity): \Qubus\Expressive\DataMapper\SerializableEntity
Parameters:
| Parameter | Type | Description |
|---|---|---|
$entity | \Qubus\Expressive\DataMapper\SerializableEntity |
Throws:
update
public update(\Qubus\Expressive\DataMapper\SerializableEntity $entity): \Qubus\Expressive\DataMapper\SerializableEntity
Parameters:
| Parameter | Type | Description |
|---|---|---|
$entity | \Qubus\Expressive\DataMapper\SerializableEntity |
Throws:
delete
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id | int|string |
Throws:
buildSelectString
Throws:
buildOrderByString
Parameters:
| Parameter | Type | Description |
|---|---|---|
$orderBy | string | |
$direction | string |
Throws:
buildLimitOffsetString
Parameters:
| Parameter | Type | Description |
|---|---|---|
$limit | int | |
$offset | int |
Throws:
buildInsertString
Parameters:
| Parameter | Type | Description |
|---|---|---|
$properties | list |
Throws:
buildUpdateString
Throws:
buildDeleteString
Throws:
mapRowToObject
Parameters:
| Parameter | Type | Description |
|---|---|---|
$row | array |
Throws:
quotedColumn
Parameters:
| Parameter | Type | Description |
|---|---|---|
$property | string |
Throws:
insertProperties
Parameters:
| Parameter | Type | Description |
|---|---|---|
$entity | \Qubus\Expressive\DataMapper\SerializableEntity |
propertyValue
private propertyValue(\Qubus\Expressive\DataMapper\SerializableEntity $entity, string $property): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$entity | \Qubus\Expressive\DataMapper\SerializableEntity | |
$property | string |
Throws: