Properties

$table

$table : string

Table

Type

string

$primaryKeys

$primaryKeys : array

Primary keys

Type

array

$primaryValues

$primaryValues : array

Primary values

Type

array

$columns

$columns : array

Row column values

Type

array

Methods

__construct()

__construct(string  $table, mixed  $primaryKeys = null) 

Constructor

Instantiate the row gateway object.

Parameters

string $table
mixed $primaryKeys

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

setPrimaryKeys()

setPrimaryKeys(mixed  $keys) : \Pop\Db\Gateway\Row

Set the primary keys

Parameters

mixed $keys

Returns

\Pop\Db\Gateway\Row

getPrimaryKeys()

getPrimaryKeys() : array

Get the primary keys

Returns

array

setPrimaryValues()

setPrimaryValues(mixed  $values) : \Pop\Db\Gateway\Row

Set the primary values

Parameters

mixed $values

Returns

\Pop\Db\Gateway\Row

getPrimaryValues()

getPrimaryValues() : array

Get the primary values

Returns

array

doesPrimaryCountMatch()

doesPrimaryCountMatch() : void

Determine if number of primary keys and primary values match

Throws

\Pop\Db\Gateway\Exception

setColumns()

setColumns(array  $columns = array()) : \Pop\Db\Gateway\Row

Set the columns

Parameters

array $columns

Returns

\Pop\Db\Gateway\Row

getColumns()

getColumns() : array

Get the columns

Returns

array

find()

find(mixed  $values) : array

Find row by primary key values

Parameters

mixed $values

Throws

\Pop\Db\Gateway\Exception

Returns

array

update()

update() : \Pop\Db\Gateway\Row

Update an existing row in the table

Throws

\Pop\Db\Gateway\Exception

Returns

\Pop\Db\Gateway\Row

delete()

delete() : \Pop\Db\Gateway\Row

Delete row from the table using the primary key(s)

Throws

\Pop\Db\Gateway\Exception

Returns

\Pop\Db\Gateway\Row

__set()

__set(string  $name, mixed  $value) : void

Magic method to set the property to the value of $this->columns[$name].

Parameters

string $name
mixed $value

__get()

__get(string  $name) : mixed

Magic method to return the value of $this->columns[$name].

Parameters

string $name

Returns

mixed

__isset()

__isset(string  $name) : boolean

Magic method to return the isset value of $this->columns[$name].

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : void

Magic method to unset $this->columns[$name].

Parameters

string $name

offsetExists()

offsetExists(mixed  $offset) : boolean

ArrayAccess offsetExists

Parameters

mixed $offset

Returns

boolean

offsetGet()

offsetGet(mixed  $offset) : mixed

ArrayAccess offsetGet

Parameters

mixed $offset

Returns

mixed

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : void

ArrayAccess offsetSet

Parameters

mixed $offset
mixed $value

Throws

\Pop\Db\Gateway\Exception

offsetUnset()

offsetUnset(mixed  $offset) : void

ArrayAccess offsetUnset

Parameters

mixed $offset

Throws

\Pop\Db\Gateway\Exception