Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class TableRow

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

Object
Extended by TableRow implements IteratorAggregate, ArrayAccess
Package: Nette\Database\Table
Author: Jakub Vrana
Located at Database/Table/ActiveRow.php
Methods summary
public
# __construct( array $data, TableSelection $table )
public
# __toString( )
public array
# toArray( )

Returns

array
public mixed
# getPrimary( boolean $need = TRUE )

Returns primary key value.

Returns primary key value.

Parameters

$need
boolean

Returns

mixed
public string
# getSignature( boolean $need = TRUE )

Returns row signature (composition of primary keys)

Returns row signature (composition of primary keys)

Parameters

$need
boolean

Returns

string
public TableRow
# ref( string $key, string $throughColumn = NULL )

Returns referenced row.

Returns referenced row.

Parameters

$key
string
$throughColumn
string

Returns

TableRow
or NULL if the row does not exist
public GroupedTableSelection
# related( string $key, string $throughColumn = NULL )

Returns referencing rows.

Returns referencing rows.

Parameters

$key
string
$throughColumn
string

Returns

GroupedTableSelection
public integer
# update( array $data = NULL )

Updates row.

Updates row.

Parameters

$data
array
or NULL for all modified values

Returns

integer
number of affected rows or FALSE in case of an error
public integer
# delete( )

Deletes row.

Deletes row.

Returns

integer
number of affected rows or FALSE in case of an error
public
# getIterator( )

Implementation of

IteratorAggregate::getIterator()
public
# offsetSet( string $key, string $value )

Stores value in column.

Stores value in column.

Parameters

$key
string
column name
$value
string
value

Implementation of

ArrayAccess::offsetSet()
public string
# offsetGet( string $key )

Returns value of column.

Returns value of column.

Parameters

$key
string
column name

Returns

string

Implementation of

ArrayAccess::offsetGet()
public boolean
# offsetExists( string $key )

Tests if column exists.

Tests if column exists.

Parameters

$key
string
column name

Returns

boolean

Implementation of

ArrayAccess::offsetExists()
public
# offsetUnset( string $key )

Removes column from data.

Removes column from data.

Parameters

$key
string
column name

Implementation of

ArrayAccess::offsetUnset()
public
# __set( string $key, mixed $value )

Sets value of a property. Do not call directly.

Sets value of a property. Do not call directly.

Parameters

$key
string
property name
$value
mixed
property value

Throws

MemberAccessException
if the property is not defined or is read-only

Overrides

Object::__set()
public mixed &
# __get( string $key )

Returns property value. Do not call directly.

Returns property value. Do not call directly.

Parameters

$key
string
property name

Returns

mixed
property value

Throws

MemberAccessException
if the property is not defined.

Overrides

Object::__get()
public boolean
# __isset( string $key )

Is property defined?

Is property defined?

Parameters

$key
string
property name

Returns

boolean

Overrides

Object::__isset()
public
# __unset( string $key )

Access to undeclared property.

Access to undeclared property.

Parameters

$key
string
property name

Throws

MemberAccessException

Overrides

Object::__unset()
protected
# accessColumn( $key, $selectColumn = TRUE )
protected
# removeAccessColumn( $key )
protected
# getReference( $table, $column )
Methods inherited from Object
__call(), __callStatic(), extensionMethod(), getReflection()
Magic properties inherited from Object
$reflection
Nette Framework 2.0.18 (for PHP 5.2, un-prefixed) API documentation generated by ApiGen 2.8.0