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

void
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)

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

Returns referenced row.

related(string $key, string|null $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

mixed
__get(string $key)

No description

__isset($key)

No description

__unset($key)

No description

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

No description

void
removeAccessColumn(string $key)

No description

Details

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

No description

Parameters

array $data
Selection $table

at line 38
void setTable(Selection $table)

internal  
 

No description

Parameters

Selection $table

Return Value

void

at line 47
Selection getTable()

internal  
 

No description

Return Value

Selection

at line 53
__toString()

No description

at line 59
array toArray()

No description

Return Value

array

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

Returns primary key value.

Parameters

bool $throw

Return Value

mixed

possible int, string, array, object (Nette\Database\DateTime)

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

Returns row signature (composition of primary keys)

Parameters

bool $throw

Return Value

string

at line 116
ActiveRow|null ref(string $key, string|null $throughColumn = null)

Returns referenced row.

Parameters

string $key
string|null $throughColumn

Return Value

ActiveRow|null

if the row does not exist

Returns referencing rows.

Parameters

string $key
string|null $throughColumn

Return Value

GroupedSelection

at line 144
bool update(iterable $data)

Updates row.

Parameters

iterable $data

Return Value

bool

at line 181
int delete()

Deletes row.

Return Value

int

number of affected rows

at line 198
Iterator getIterator()

No description

Return Value

Iterator

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

Stores value in column.

Parameters

string $column
mixed $value

Return Value

void

at line 223
mixed offsetGet(string $column)

Returns value of column.

Parameters

string $column

Return Value

mixed

at line 233
bool offsetExists(string $column)

Tests if column exists.

Parameters

string $column

Return Value

bool

at line 243
void offsetUnset(string $column)

Removes column from data.

Parameters

string $column

Return Value

void

at line 249
__set($column, $value)

No description

Parameters

$column
$value

at line 259
mixed __get(string $key)

No description

Parameters

string $key

Return Value

mixed

Exceptions

MemberAccessException

at line 277
__isset($key)

No description

Parameters

$key

at line 294
__unset($key)

No description

Parameters

$key

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

internal  
 

No description

Parameters

$key
bool $selectColumn

Return Value

bool

at line 318
protected void removeAccessColumn(string $key)

No description

Parameters

string $key

Return Value

void