TableGateway

Extends \Core\Orm\Gateway\TableAbstract

package

Default

Methods

__construct

__construct() 
inherited

Delete a row or rowset

_delete(array $where) : boolean
inherited

Arguments

$where

array

Where conditions array

Response

boolean

_fetch

_fetch(array $where = null, array $column = null,  $order = null,  $limit = null) 
inherited

Arguments

$where

array

$column

array

$order

$limit

_fetchAll

_fetchAll( $query,  $params) 
inherited

Arguments

$query

$params

_fetchRow

_fetchRow( $query,  $params) 
inherited

Arguments

$query

$params

_insert

_insert( $query,  $params) 
inherited

Arguments

$query

$params

_setTableColumns

_setTableColumns() 
inherited

Update a row or rowset

_update(array $data, array $where) : boolean
inherited

Arguments

$data

array

Data array

$where

array

Where conditions array

Response

boolean

Delete a row or rowset

delete(array $where) : boolean

Arguments

$where

array

Response

boolean

Fetch all rows

fetchAll(array $where = null, array $column = null, array $order = null, string $limit = null, boolean $lazy = false) : array

Arguments

$where

array

Where conditions array

$column

array

Array with columns that you want.

$order

array

Array with order condition ('first_name, last_name' => 'DESC')

$limit

string

String with limit value

$lazy

boolean

Lazy return. If this is true, the response will be an array

Response

array

| bool

Fetch one row

fetchRow(array $where = null, array $column = null, array $order = null) : \Core\Orm\RowGateway

Arguments

$where

array

Where conditions array

$column

array

Array with columns that you want.

$order

array

Array with order condition ('first_name, last_name' => 'DESC')

Response

\Core\Orm\RowGateway

Find a row by primary key

find(mixed $primaryKey) : \Core\Orm\RowGateway

Arguments

$primaryKey

mixed

Primary key value

Response

\Core\Orm\RowGateway

| bool

getAdapter

getAdapter() 
inherited

getBelongsToRelationship

getBelongsToRelationship() 
inherited

getManyRelationship

getManyRelationship() 
inherited

getOneRelationship

getOneRelationship() 
inherited

getPrimaryKey

getPrimaryKey() 
inherited

getTableColumns

getTableColumns() 
inherited

getTableName

getTableName() 
inherited

Create new row

insert(array $data) : \Core\Orm\RowGateway

Arguments

$data

array

Array with data ('column_name' => 'foo')

Response

\Core\Orm\RowGateway

| bool

Update a row or rowset

update(array $data, array $where) : boolean

Arguments

$data

array

Data array

$where

array

Where conditions array

Response

boolean

Properties

db

db : 
inherited

Type(s)

_name

_name : 
inherited

Type(s)

_primary

_primary : 
inherited

Type(s)

_rowClass

_rowClass : 
inherited

Type(s)

_columns

_columns : 
inherited

Type(s)

_has_many

_has_many : 
inherited

Type(s)

_has_one

_has_one : 
inherited

Type(s)

_belongs_to

_belongs_to : 
inherited

Type(s)