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(bool $throw = true)

Returns primary key value.

string
getSignature(bool $throw = true)

Returns row signature (composition of primary keys)

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

Returns referenced row.

related(string $key, string $throughColumn = null)

Returns referencing rows.

bool
update(iterable $data)

Updates row.

int
delete()

Deletes row.

getIterator()

No description

void
offsetSet(string $column, mixed $value)

Stores value in column.

mixed
offsetGet(string $column)

Returns value of column.

bool
offsetExists(string $column)

Tests if column exists.

void
offsetUnset(string $column)

Removes column from data.

__set($column, $value)

No description

ActiveRow|mixed
__get(string $key)

No description

__isset($key)

No description

__unset($key)

No description

bool
accessColumn(string $key, bool $selectColumn = true)

No description

void
removeAccessColumn(string $key)

No description

void
reloadAllColumns()

No description

void
refreshData()

No description

Details

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

Parameters

array $data
Selection $table

at line 41
setTable(Selection $table)

Parameters

Selection $table

at line 50
Selection getTable()

Return Value

Selection

at line 56
__toString()

at line 69
array toArray()

Return Value

array

at line 80
mixed getPrimary(bool $throw = true)

Returns primary key value.

Parameters

bool $throw

Return Value

mixed

at line 115
string getSignature(bool $throw = true)

Returns row signature (composition of primary keys)

Parameters

bool $throw

Return Value

string

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

Returns referenced row.

Parameters

string $key
string $throughColumn

Return Value

IRow|null

Returns referencing rows.

Parameters

string $key
string $throughColumn

Return Value

GroupedSelection

at line 153
bool update(iterable $data)

Updates row.

Parameters

iterable $data

Return Value

bool

at line 188
int delete()

Deletes row.

Return Value

int number of affected rows

at line 205
Iterator getIterator()

Return Value

Iterator

at line 220
void offsetSet(string $column, mixed $value)

Stores value in column.

Parameters

string $column
mixed $value

Return Value

void

at line 231
mixed offsetGet(string $column)

Returns value of column.

Parameters

string $column

Return Value

mixed

at line 241
bool offsetExists(string $column)

Tests if column exists.

Parameters

string $column

Return Value

bool

at line 251
void offsetUnset(string $column)

Removes column from data.

Parameters

string $column

Return Value

void

at line 257
__set($column, $value)

Parameters

$column
$value

at line 267
ActiveRow|mixed __get(string $key)

Parameters

string $key

Return Value

ActiveRow|mixed

Exceptions

MemberAccessException

at line 285
__isset($key)

Parameters

$key

at line 302
__unset($key)

Parameters

$key

at line 311
bool accessColumn(string $key, bool $selectColumn = true)

Parameters

string $key
bool $selectColumn

Return Value

bool

at line 320
protected void removeAccessColumn(string $key)

Parameters

string $key

Return Value

void

at line 326
protected void reloadAllColumns()

Return Value

void

at line 334
protected void refreshData()

Return Value

void