class ActiveRow implements IteratorAggregate, IRow

Single row representation.

ActiveRow is based on the great library NotORM http://www.notorm.com written by Jakub Vrana.

Methods

__construct(array $data, Selection $table)

No description

setTable(Selection $table)

No description

getTable()

No description

__toString()

No description

array
toArray()

No description

mixed
getPrimary($throw = true)

Returns primary key value.

string
getSignature($throw = true)

Returns row signature (composition of primary keys)

IRow|null
ref($key, $throughColumn = null)

Returns referenced row.

related($key, $throughColumn = null)

Returns referencing rows.

bool
update($data)

Updates row.

int
delete()

Deletes row.

getIterator()

No description

void
offsetSet($column, $value)

Stores value in column.

mixed
offsetGet($column)

Returns value of column.

bool
offsetExists($column)

Tests if column exists.

void
offsetUnset($column)

Removes column from data.

__set($column, $value)

No description

ActiveRow|mixed
__get($key)

No description

__isset($key)

No description

__unset($key)

No description

accessColumn($key, $selectColumn = true)

No description

removeAccessColumn($key)

No description

Details

at line 29
__construct(array $data, Selection $table)

No description

Parameters

array $data
Selection $table

at line 39
setTable(Selection $table)

internal  
 

No description

Parameters

Selection $table

at line 48
Selection getTable()

internal  
 

No description

Return Value

Selection

at line 54
__toString()

No description

at line 73
array toArray()

No description

Return Value

array

at line 85
mixed getPrimary($throw = true)

Returns primary key value.

Parameters

$throw

Return Value

mixed

at line 122
string getSignature($throw = true)

Returns row signature (composition of primary keys)

Parameters

$throw

Return Value

string

at line 134
IRow|null ref($key, $throughColumn = null)

Returns referenced row.

Parameters

$key
$throughColumn

Return Value

IRow|null

if the row does not exist

Returns referencing rows.

Parameters

$key
$throughColumn

Return Value

GroupedSelection

at line 167
bool update($data)

Updates row.

Parameters

$data

Return Value

bool

at line 202
int delete()

Deletes row.

Return Value

int

number of affected rows

at line 219
getIterator()

No description

at line 235
void offsetSet($column, $value)

Stores value in column.

Parameters

$column
$value

Return Value

void

at line 246
mixed offsetGet($column)

Returns value of column.

Parameters

$column

Return Value

mixed

at line 257
bool offsetExists($column)

Tests if column exists.

Parameters

$column

Return Value

bool

at line 268
void offsetUnset($column)

Removes column from data.

Parameters

$column

Return Value

void

at line 274
__set($column, $value)

No description

Parameters

$column
$value

at line 285
ActiveRow|mixed __get($key)

No description

Parameters

$key

Return Value

ActiveRow|mixed

Exceptions

MemberAccessException

at line 303
__isset($key)

No description

Parameters

$key

at line 320
__unset($key)

No description

Parameters

$key

at line 329
accessColumn($key, $selectColumn = true)

internal  
 

No description

Parameters

$key
$selectColumn

at line 342
protected removeAccessColumn($key)

No description

Parameters

$key