Properties

$table

$table : string

Table name

Type

string

$prefix

$prefix : string

Table prefix

Type

string

$primaryKeys

$primaryKeys : array

Primary keys

Type

array

$isNew

$isNew : boolean

Is new record flag

Type

boolean

$with

$with : array

With relationships

Type

array

$withOptions

$withOptions : array

With relationship options

Type

array

$relationships

$relationships : array

Relationships

Type

array

Methods

setTable()

setTable(string  $table) : \Pop\Db\Record\AbstractRecord

Set the table

Parameters

string $table

Returns

\Pop\Db\Record\AbstractRecord

setTableFromClassName()

setTableFromClassName(string  $class = null) : mixed

Set the table from a class name

Parameters

string $class

Returns

mixed

setPrefix()

setPrefix(string  $prefix) : \Pop\Db\Record\AbstractRecord

Set the table prefix

Parameters

string $prefix

Returns

\Pop\Db\Record\AbstractRecord

setPrimaryKeys()

setPrimaryKeys(array  $keys) : \Pop\Db\Record\AbstractRecord

Set the primary keys

Parameters

array $keys

Returns

\Pop\Db\Record\AbstractRecord

getTable()

getTable() : string

Get the table

Returns

string

getFullTable()

getFullTable() : string

Get the full table name (prefix + table)

Returns

string

getPrefix()

getPrefix() : string

Get the table prefix

Returns

string

getPrimaryKeys()

getPrimaryKeys() : array

Get the primary keys

Returns

array

getPrimaryValues()

getPrimaryValues() : array

Get the primary values

Returns

array

getRowGateway()

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

Get the row gateway

Returns

\Pop\Db\Gateway\Row

getTableGateway()

getTableGateway() : \Pop\Db\Gateway\Table

Get the table gateway

Returns

\Pop\Db\Gateway\Table

toArray()

toArray() : array

Get column values as array

Returns

array

count()

count() : integer

Method to get count of fields in row gateway

Returns

integer

getIterator()

getIterator() : \ArrayIterator

Method to iterate over the columns

Returns

\ArrayIterator

countRows()

countRows() : integer

Get the count of rows returned in the result

Returns

integer

hasRows()

hasRows() : boolean

Determine if the result has rows

Returns

boolean

setColumns()

setColumns(mixed  $columns = null) : \Pop\Db\Record\AbstractRecord

Set all the table column values at once

Parameters

mixed $columns

Throws

\Pop\Db\Record\Exception

Returns

\Pop\Db\Record\AbstractRecord

setRows()

setRows(array  $rows = null, boolean  $asArray = false) : \Pop\Db\Record\AbstractRecord

Set all the table rows at once

Parameters

array $rows
boolean $asArray

Returns

\Pop\Db\Record\AbstractRecord

processRows()

processRows(array  $rows, boolean  $asArray = false) : array

Process table rows

Parameters

array $rows
boolean $asArray

Returns

array

processRow()

processRow(array  $row, boolean  $asArray = false) : mixed

Process a table row

Parameters

array $row
boolean $asArray

Returns

mixed

addWith()

addWith(string  $name, array  $options = null) : \Pop\Db\Record\AbstractRecord

Set with relationships

Parameters

string $name
array $options

Returns

\Pop\Db\Record\AbstractRecord

hasWith()

hasWith(string  $name) : boolean

Determine if there is specific with relationship

Parameters

string $name

Returns

boolean

hasWiths()

hasWiths() : boolean

Determine if there are with relationships

Returns

boolean

getWiths()

getWiths() : array

Get with relationships

Returns

array

getWithRelationships()

getWithRelationships(boolean  $eager = true) : \Pop\Db\Record\AbstractRecord

Get with relationships

Parameters

boolean $eager

Returns

\Pop\Db\Record\AbstractRecord

setRelationship()

setRelationship(string  $name, mixed  $relationship) : \Pop\Db\Record\AbstractRecord

Set relationship

Parameters

string $name
mixed $relationship

Returns

\Pop\Db\Record\AbstractRecord

getRelationship()

getRelationship(string  $name) : mixed

Get relationship

Parameters

string $name

Returns

mixed

hasRelationship()

hasRelationship(string  $name) : boolean

Has relationship

Parameters

string $name

Returns

boolean

getRelationships()

getRelationships() : array

Get relationships

Returns

array

hasRelationships()

hasRelationships() : boolean

Get relationships

Returns

boolean

__set()

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

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

Parameters

string $name
mixed $value

__get()

__get(string  $name) : mixed

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

Parameters

string $name

Returns

mixed

__isset()

__isset(string  $name) : boolean

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

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : void

Magic method to unset $this->rowGateway[$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

offsetUnset()

offsetUnset(mixed  $offset) : void

ArrayAccess offsetUnset

Parameters

mixed $offset