package Default
inherited_from \Zend\Db\TableGateway\Feature\AbstractFeature

 Methods

__call()

__call($method, $arguments) : mixed
Inherited

Parameters

$method

$arguments

Exceptions

\Zend\Db\TableGateway\Exception\InvalidArgumentException

Returns

mixed

__clone

__clone() 
Inherited

__construct()

__construct(\Zend\EventManager\EventManagerInterface $eventManager = null, \Zend\Db\TableGateway\Feature\EventFeature\TableGatewayEvent $tableGatewayEvent = null

Parameters

$eventManager

\Zend\EventManager\EventManagerInterface

$tableGatewayEvent

\Zend\Db\TableGateway\Feature\EventFeature\TableGatewayEvent

__get

__get(string $property) : mixed
Inherited

Parameters

$property

string

Exceptions

\Zend\Db\TableGateway\Exception\InvalidArgumentException

Returns

mixed

__set()

__set(string $property, mixed $value) : mixed
Inherited

Parameters

$property

string

$value

mixed

Exceptions

\Zend\Db\TableGateway\Exception\InvalidArgumentException

Returns

mixed

Delete

delete(\Zend\Db\Sql\Where|\Closure|string|array $where) : integer
Inherited
inherited_from \Zend\Db\TableGateway\TableGatewayInterface::delete()

Parameters

$where

\Zend\Db\Sql\Where\Closurestringarray

Returns

integer

deleteWith()

deleteWith(\Zend\Db\Sql\Delete $delete) : mixed
Inherited

Parameters

$delete

\Zend\Db\Sql\Delete

Returns

mixed

Get adapter

getAdapter() : \Zend\Db\Adapter\AdapterInterface
Inherited

Returns

\Zend\Db\Adapter\AdapterInterface

getColumns()

getColumns() : array
Inherited

Returns

array

Retrieve composed event instance

getEvent() : \Zend\Db\TableGateway\Feature\EventFeature\TableGatewayEvent

Returns

\Zend\Db\TableGateway\Feature\EventFeature\TableGatewayEvent

Retrieve composed event manager instance

getEventManager() : \Zend\EventManager\EventManagerInterface

Lazy-loads an EventManager instance if none registered.

inherited_from \Zend\EventManager\EventsCapableInterface::getEventManager()

Returns

\Zend\EventManager\EventManagerInterface

getFeatureSet()

getFeatureSet() : \Zend\Db\TableGateway\Feature\FeatureSet
Inherited

Returns

\Zend\Db\TableGateway\Feature\FeatureSet

Get last insert value

getLastInsertValue() : integer
Inherited

Returns

integer

getMagicMethodSpecifications()

getMagicMethodSpecifications() 
Inherited

getName()

getName() 
Inherited

Get select result prototype

getResultSetPrototype() : \Zend\Db\ResultSet\ResultSet
Inherited

Returns

\Zend\Db\ResultSet\ResultSet

getSql()

getSql() : \Zend\Db\Sql\Sql
Inherited

Returns

\Zend\Db\Sql\Sql

Get table name

getTable() : string
Inherited
inherited_from \Zend\Db\TableGateway\TableGatewayInterface::getTable()

Returns

string

Initialize

initialize() : null
Inherited

Exceptions

\Zend\Db\TableGateway\Exception\RuntimeException

Returns

null

Insert

insert(array $set) : integer
Inherited
inherited_from \Zend\Db\TableGateway\TableGatewayInterface::insert()

Parameters

$set

array

Returns

integer

insertWith()

insertWith(\Zend\Db\Sql\Insert $insert) : mixed
Inherited

Parameters

$insert

\Zend\Db\Sql\Insert

Returns

mixed

isInitialized()

isInitialized() : boolean
Inherited

Returns

boolean

Trigger the "postDelete" event

postDelete(\Zend\Db\Adapter\Driver\StatementInterface $statement, \Zend\Db\Adapter\Driver\ResultInterface $result) : void

Triggers the "postDelete" event mapping the following parameters:

  • $statement as "statement"
  • $result as "result"

Parameters

$statement

\Zend\Db\Adapter\Driver\StatementInterface

$result

\Zend\Db\Adapter\Driver\ResultInterface

Trigger the "postInitialize" event

postInitialize() : void

Trigger the "postInsert" event

postInsert(\Zend\Db\Adapter\Driver\StatementInterface $statement, \Zend\Db\Adapter\Driver\ResultInterface $result) : void

Triggers the "postInsert" event mapping the following parameters:

  • $statement as "statement"
  • $result as "result"

Parameters

$statement

\Zend\Db\Adapter\Driver\StatementInterface

$result

\Zend\Db\Adapter\Driver\ResultInterface

Trigger the "postSelect" event

postSelect(\Zend\Db\Adapter\Driver\StatementInterface $statement, \Zend\Db\Adapter\Driver\ResultInterface $result, \Zend\Db\ResultSet\ResultSetInterface $resultSet) : void

Triggers the "postSelect" event mapping the following parameters:

  • $statement as "statement"
  • $result as "result"
  • $resultSet as "result_set"

Parameters

$statement

\Zend\Db\Adapter\Driver\StatementInterface

$result

\Zend\Db\Adapter\Driver\ResultInterface

$resultSet

\Zend\Db\ResultSet\ResultSetInterface

Trigger the "postUpdate" event

postUpdate(\Zend\Db\Adapter\Driver\StatementInterface $statement, \Zend\Db\Adapter\Driver\ResultInterface $result) : void

Triggers the "postUpdate" event mapping the following parameters:

  • $statement as "statement"
  • $result as "result"

Parameters

$statement

\Zend\Db\Adapter\Driver\StatementInterface

$result

\Zend\Db\Adapter\Driver\ResultInterface

Trigger the "preDelete" event

preDelete(\Zend\Db\Sql\Delete $delete) : void

Triggers the "preDelete" event mapping the following parameters:

  • $delete as "delete"

Parameters

$delete

\Zend\Db\Sql\Delete

Initialize feature and trigger "preInitialize" event

preInitialize() : void

Ensures that the composed TableGateway has identifiers based on the class name, and that the event target is set to the TableGateway instance. It then triggers the "preInitialize" event.

Trigger the "preInsert" event

preInsert(\Zend\Db\Sql\Insert $insert) : void

Triggers the "preInsert" event mapping the following parameters:

  • $insert as "insert"

Parameters

$insert

\Zend\Db\Sql\Insert

Trigger the "preSelect" event

preSelect(\Zend\Db\Sql\Select $select) : void

Triggers the "preSelect" event mapping the following parameters:

  • $select as "select"

Parameters

$select

\Zend\Db\Sql\Select

Trigger the "preUpdate" event

preUpdate(\Zend\Db\Sql\Update $update) : void

Triggers the "preUpdate" event mapping the following parameters:

  • $update as "update"

Parameters

$update

\Zend\Db\Sql\Update

Select

select(\Zend\Db\Sql\Where|\Closure|string|array $where = null) : \Zend\Db\ResultSet\ResultSet
Inherited
inherited_from \Zend\Db\TableGateway\TableGatewayInterface::select()

Parameters

$where

\Zend\Db\Sql\Where\Closurestringarray

Returns

\Zend\Db\ResultSet\ResultSet

selectWith()

selectWith(\Zend\Db\Sql\Select $select) : null | \Zend\Db\ResultSet\ResultSetInterface
Inherited

Parameters

$select

\Zend\Db\Sql\Select

Exceptions

\RuntimeException

Returns

null\Zend\Db\ResultSet\ResultSetInterface

setTableGateway()

setTableGateway(\Zend\Db\TableGateway\AbstractTableGateway $tableGateway) 
Inherited

Parameters

$tableGateway

Update

update(array $set, string|array|\Closure $where = null) : integer
Inherited
inherited_from \Zend\Db\TableGateway\TableGatewayInterface::update()

Parameters

$set

array

$where

stringarray\Closure

Returns

integer

updateWith()

updateWith(\Zend\Db\Sql\Update $update) : mixed
Inherited

Parameters

$update

\Zend\Db\Sql\Update

Returns

mixed

executeDelete()

executeDelete(\Zend\Db\Sql\Delete $delete) : mixed
Inherited
todo add $columns support

Parameters

$delete

\Zend\Db\Sql\Delete

Exceptions

\Zend\Db\TableGateway\Exception\RuntimeException

Returns

mixed

executeInsert()

executeInsert(\Zend\Db\Sql\Insert $insert) : mixed
Inherited
todo add $columns support

Parameters

$insert

\Zend\Db\Sql\Insert

Exceptions

\Zend\Db\TableGateway\Exception\RuntimeException

Returns

mixed

executeSelect()

executeSelect(\Zend\Db\Sql\Select $select) : \Zend\Db\ResultSet\ResultSet
Inherited

Parameters

$select

\Zend\Db\Sql\Select

Exceptions

\Zend\Db\TableGateway\Exception\RuntimeException

Returns

\Zend\Db\ResultSet\ResultSet

executeUpdate()

executeUpdate(\Zend\Db\Sql\Update $update) : mixed
Inherited
todo add $columns support

Parameters

$update

\Zend\Db\Sql\Update

Exceptions

\Zend\Db\TableGateway\Exception\RuntimeException

Returns

mixed

 Properties

 

$adapter

$adapter : \Zend\Db\Adapter\AdapterInterface

Default

null
 

$columns

$columns : array

Default

array()
 

$event

$event : null

Default

null
 

$eventManager

$eventManager : \Zend\EventManager\EventManagerInterface

Default

null
 

$featureSet

$featureSet : \Zend\Db\TableGateway\Feature\FeatureSet

Default

null
 

$isInitialized

$isInitialized : boolean

Default

false
 

$lastInsertValue

$lastInsertValue : integer

Default

null
 

$resultSetPrototype

$resultSetPrototype : \Zend\Db\ResultSet\ResultSetInterface

Default

null
 

$sharedData

$sharedData 

Default

array()
 

$sql

$sql : \Zend\Db\Sql\Sql

Default

null
 

$table

$table : string | array | \Zend\Db\Sql\TableIdentifier

Default

null
 

$tableGateway

$tableGateway : \Zend\Db\TableGateway\AbstractTableGateway

Default

null

 Constants

 

EVENT_POST_DELETE

EVENT_POST_DELETE = 'postDelete' 
 

EVENT_POST_INITIALIZE

EVENT_POST_INITIALIZE = 'postInitialize' 
 

EVENT_POST_INSERT

EVENT_POST_INSERT = 'postInsert' 
 

EVENT_POST_SELECT

EVENT_POST_SELECT = 'postSelect' 
 

EVENT_POST_UPDATE

EVENT_POST_UPDATE = 'postUpdate' 
 

EVENT_PRE_DELETE

EVENT_PRE_DELETE = 'preDelete' 
 

EVENT_PRE_INITIALIZE

EVENT_PRE_INITIALIZE = 'preInitialize' 
 

EVENT_PRE_INSERT

EVENT_PRE_INSERT = 'preInsert' 
 

EVENT_PRE_SELECT

EVENT_PRE_SELECT = 'preSelect' 
 

EVENT_PRE_UPDATE

EVENT_PRE_UPDATE = 'preUpdate'