API Documentation

Db/Table/Rowset/Abstract.php

Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Db
subpackage
Table
version
$Id: Abstract.php 22616 2010-07-17 15:53:16Z ramon $
Classes
Zend_Db_Table_Rowset_Abstract

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Db_Table_Rowset_Abstract

Implements
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Db
subpackage
Table
Properties
$_data
$_table
$_connected
$_tableClass
$_rowClass
$_pointer
$_count
$_rows
$_stored
$_readOnly
Methods
__construct
__sleep
__wakeup
init
isConnected
getTable
setTable
getTableClass
rewind
current
key
next
valid
count
seek
offsetExists
offsetGet
offsetSet
offsetUnset
getRow
toArray

Description

Properties

$_connected

boolean $_connected = 'true'

Connected is true if we have a reference to a live Zend_Db_Table_Abstract object.

This is false after the Rowset has been deserialized.

Details

$_connected
boolean
visibility
protected
default
true
final
false
static
false

$_count

integer $_count = ''

How many data rows there are.

Details

$_count
integer
visibility
protected
default
final
false
static
false

$_data

array $_data = 'array'

The original data for each row.

Details

$_data
array
visibility
protected
default
array
final
false
static
false

$_pointer

integer $_pointer = '0'

Iterator pointer.

Details

$_pointer
integer
visibility
protected
default
0
final
false
static
false

$_readOnly

boolean $_readOnly = 'false'

Details

$_readOnly
boolean
visibility
protected
default
false
final
false
static
false

$_rowClass

string $_rowClass = 'Zend_Db_Table_Row'

Zend_Db_Table_Row_Abstract class name.

Details

$_rowClass
string
visibility
protected
default
Zend_Db_Table_Row
final
false
static
false

$_rows

array $_rows = 'array'

Collection of instantiated Zend_Db_Table_Row objects.

Details

$_rows
array
visibility
protected
default
array
final
false
static
false

$_stored

boolean $_stored = 'false'

Details

$_stored
boolean
visibility
protected
default
false
final
false
static
false

$_table

Zend_Db_Table_Abstract $_table = ''

Zend_Db_Table_Abstract object.

Details

$_table
Zend_Db_Table_Abstract
visibility
protected
default
final
false
static
false

$_tableClass

string $_tableClass = ''

Zend_Db_Table_Abstract class name.

Details

$_tableClass
string
visibility
protected
default
final
false
static
false

Methods

__construct

__construct( array $config ) :

Constructor.

Arguments
$config
array
Details
visibility
public
final
false
static
false

__sleep

__sleep( ) : array

Store data, class names, and state in serialized object

Output
array
Details
visibility
public
final
false
static
false

__wakeup

__wakeup( ) : void

Setup to do on wakeup.

A de-serialized Rowset should not be assumed to have access to a live database connection, so set _connected = false.

Details
visibility
public
final
false
static
false

count

count( ) : int

Returns the number of elements in the collection.

Implements Countable::count()

Output
int
Details
visibility
public
final
false
static
false

current

current( ) : Zend_Db_Table_Row_Abstract

Return the current element.

Similar to the current() function for arrays in PHP Required by interface Iterator.

Output
Zend_Db_Table_Row_Abstract
current element from the collection
Details
visibility
public
final
false
static
false

getRow

getRow( int $position, bool $seek = false ) : Zend_Db_Table_Row

Returns a Zend_Db_Table_Row from a known position into the Iterator

Arguments
$position
int
the position of the row expected
$seek
bool
wether or not seek the iterator to that position after
Details
visibility
public
final
false
static
false
throws

getTable

getTable( ) : Zend_Db_Table_Abstract

Returns the table object, or null if this is disconnected rowset

Details
visibility
public
final
false
static
false

getTableClass

getTableClass( ) : string

Query the class name of the Table object for which this Rowset was created.

Output
string
Details
visibility
public
final
false
static
false

init

init( ) : void

Initialize object

Called from {@link __construct()} as final step of object instantiation.

Details
visibility
public
final
false
static
false

isConnected

isConnected( ) : boolean

Return the connected state of the rowset.

Output
boolean
Details
visibility
public
final
false
static
false

key

key( ) : int

Return the identifying key of the current element.

Similar to the key() function for arrays in PHP. Required by interface Iterator.

Output
int
Details
visibility
public
final
false
static
false

next

next( ) : void

Move forward to next element.

Similar to the next() function for arrays in PHP. Required by interface Iterator.

Details
visibility
public
final
false
static
false

offsetExists

offsetExists( string $offset ) : boolean

Check if an offset exists Required by the ArrayAccess implementation

Arguments
$offset
string
Output
boolean
Details
visibility
public
final
false
static
false

offsetGet

offsetGet( string $offset ) : Zend_Db_Table_Row_Abstract

Get the row for the given offset Required by the ArrayAccess implementation

Arguments
$offset
string
Details
visibility
public
final
false
static
false

offsetSet

offsetSet( string $offset, mixed $value ) :

Does nothing Required by the ArrayAccess implementation

Arguments
$offset
string
$value
mixed
Details
visibility
public
final
false
static
false

offsetUnset

offsetUnset( string $offset ) :

Does nothing Required by the ArrayAccess implementation

Arguments
$offset
string
Details
visibility
public
final
false
static
false

rewind

rewind( ) : Zend_Db_Table_Rowset_Abstract

Rewind the Iterator to the first element.

Similar to the reset() function for arrays in PHP. Required by interface Iterator.

Output
Zend_Db_Table_Rowset_Abstract
Fluent interface.
Details
visibility
public
final
false
static
false

seek

seek( int $position ) : Zend_Db_Table_Rowset_Abstract

Take the Iterator to position $position Required by interface SeekableIterator.

Arguments
$position
int
the position to seek to
Details
visibility
public
final
false
static
false
throws

setTable

setTable( Zend_Db_Table_Abstract $table ) : boolean

Set the table object, to re-establish a live connection to the database for a Rowset that has been de-serialized.

Arguments
$table
Zend_Db_Table_Abstract
Output
boolean
Details
visibility
public
final
false
static
false
throws

toArray

toArray( ) : array

Returns all data as an array.

Updates the $_data property with current row object values.

Output
array
Details
visibility
public
final
false
static
false

valid

valid( ) : bool

Check if there is a current element after calls to rewind() or next().

Used to check if we've iterated to the end of the collection. Required by interface Iterator.

Output
bool
False if there's nothing more to iterate over
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.