PHP Class Nette\Database\Table\ActiveRow

ActiveRow is based on the great library NotORM http://www.notorm.com written by Jakub Vrana.
Author: Jakub Vrana
Inheritance: extends Nette\Object, implements IteratorAggregate, implements ArrayAccess
Mostra file Open project: nette/database Class Usage Examples

Public Methods

Method Description
__construct ( array $data, Selection $table )
__get ( $key ) : ActiveRow | mixed
__isset ( $key )
__set ( $key, $value )
__toString ( )
__unset ( $key )
accessColumn ( $key, $selectColumn = TRUE )
delete ( ) : integer Deletes row.
getIterator ( ) ******************* interface IteratorAggregate ****************d*g*
getPrimary ( $need = TRUE ) : mixed Returns primary key value.
getSignature ( $need = TRUE ) : string Returns row signature (composition of primary keys)
getTable ( )
offsetExists ( $key ) : boolean Tests if column exists.
offsetGet ( $key ) : string Returns value of column.
offsetSet ( $key, $value ) : void Stores value in column.
offsetUnset ( $key ) : void Removes column from data.
ref ( $key, $throughColumn = NULL ) : Nette\Database\Table\IRow Returns referenced row.
related ( $key, $throughColumn = NULL ) : GroupedSelection Returns referencing rows.
setTable ( Selection $table )
toArray ( ) : array
update ( $data ) : boolean Updates row.

Protected Methods

Method Description
removeAccessColumn ( $key )

Method Details

__construct() public method

public __construct ( array $data, Selection $table )
$data array
$table Selection

__get() public method

public __get ( $key ) : ActiveRow | mixed
return ActiveRow | mixed

__isset() public method

public __isset ( $key )

__set() public method

public __set ( $key, $value )

__toString() public method

public __toString ( )

__unset() public method

public __unset ( $key )

accessColumn() public method

public accessColumn ( $key, $selectColumn = TRUE )

delete() public method

Deletes row.
public delete ( ) : integer
return integer number of affected rows

getIterator() public method

******************* interface IteratorAggregate ****************d*g*
public getIterator ( )

getPrimary() public method

Returns primary key value.
public getPrimary ( $need = TRUE ) : mixed
return mixed possible int, string, array, object (Nette\Utils\DateTime)

getSignature() public method

Returns row signature (composition of primary keys)
public getSignature ( $need = TRUE ) : string
return string

getTable() public method

public getTable ( )

offsetExists() public method

Tests if column exists.
public offsetExists ( $key ) : boolean
return boolean

offsetGet() public method

Returns value of column.
public offsetGet ( $key ) : string
return string

offsetSet() public method

Stores value in column.
public offsetSet ( $key, $value ) : void
return void

offsetUnset() public method

Removes column from data.
public offsetUnset ( $key ) : void
return void

ref() public method

Returns referenced row.
public ref ( $key, $throughColumn = NULL ) : Nette\Database\Table\IRow
return Nette\Database\Table\IRow or NULL if the row does not exist

removeAccessColumn() protected method

protected removeAccessColumn ( $key )

setTable() public method

public setTable ( Selection $table )
$table Selection

toArray() public method

public toArray ( ) : array
return array

update() public method

Updates row.
public update ( $data ) : boolean
return boolean