\Pop\Db\GatewayTable

Table gateway class

Summary

Methods
Properties
Constants
__construct()
getTable()
getTableInfo()
getNumberOfRows()
getRows()
rows()
select()
insert()
update()
delete()
setRows()
No public properties found
No constants found
No protected methods found
$table
$rows
N/A
No private methods found
No private properties found
N/A

Properties

$table

$table : string

Table

Type

string

$rows

$rows : array

Result rows

Type

array

Methods

__construct()

__construct(string  $table) 

Constructor

Instantiate the AbstractGateway object.

Parameters

string $table

getTable()

getTable() : string

Get the table name

Returns

string

getTableInfo()

getTableInfo(\Pop\Db\Adapter\AbstractAdapter  $db = null) : array

Get table info

Parameters

\Pop\Db\Adapter\AbstractAdapter $db

Returns

array

getNumberOfRows()

getNumberOfRows() : integer

Get the number of result rows

Returns

integer

getRows()

getRows() : array

Get the result rows

Returns

array

rows()

rows() : array

Get the result rows (alias method)

Returns

array

select()

select(array  $columns = null, mixed  $where = null, array  $parameters = null, array  $options = null) : array

Select rows from the table

Parameters

array $columns
mixed $where
array $parameters
array $options

Returns

array

insert()

insert(array  $columns) : \Pop\Db\Gateway\Table

Insert values into the table

Parameters

array $columns

Returns

\Pop\Db\Gateway\Table

update()

update(array  $columns, mixed  $where = null, array  $parameters = array()) : \Pop\Db\Gateway\Table

Update a table

Parameters

array $columns
mixed $where
array $parameters

Returns

\Pop\Db\Gateway\Table

delete()

delete(mixed  $where = null, array  $parameters = array()) : \Pop\Db\Gateway\Table

Delete from a table

Parameters

mixed $where
array $parameters

Returns

\Pop\Db\Gateway\Table

setRows()

setRows(array  $rows = array()) : \Pop\Db\Gateway\Table

Set all the table rows at once

Parameters

array $rows

Returns

\Pop\Db\Gateway\Table