Abstract Class Zend_Db_Table_Rowset_Abstract

Description

Implements interfaces:

  • Iterator (internal interface)
  • Countable (internal interface)

  • abstract:
  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Db/Table/Rowset/Abstract.php (line 34)


	
			
Direct descendents
Class Description
 class Zend_Db_Table_Rowset Reference concrete class that extends Zend_Db_Table_Rowset_Abstract.
Variable Summary
 boolean $_connected
 integer $_count
 array $_data
 integer $_pointer
 string $_rowClass
 array $_rows
 string $_tableClass
Method Summary
 Zend_Db_Table_Rowset_Abstract __construct ( $config)
 int count ()
 bool exists ()
 string getTableClass ()
 int key ()
 int next ()
 void rewind ()
 boolean setTable (Zend_Db_Table_Abstract $table)
 array toArray ()
 bool valid ()
 array __sleep ()
 void __wakeup ()
Variables
boolean $_connected = true (line 57)

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.

  • access: protected
integer $_count (line 85)

How many data rows there are.

  • access: protected
array $_data = array() (line 41)

The original data for each row.

  • access: protected
integer $_pointer = 0 (line 78)

Iterator pointer.

  • access: protected
string $_rowClass = 'Zend_Db_Table_Row' (line 71)

Zend_Db_Table_Row_Abstract class name.

  • access: protected
array $_rows = array() (line 92)

Collection of instantiated Zend_Db_Table_Row objects.

  • access: protected
Zend_Db_Table_Abstract $_table (line 48)

Zend_Db_Table object.

  • access: protected
string $_tableClass (line 64)

Zend_Db_Table class name.

  • access: protected
Methods
Constructor __construct (line 97)

Constructor.

  • access: public
Zend_Db_Table_Rowset_Abstract __construct ( $config)
  • array $config
count (line 251)

Returns the number of elements in the collection.

  • access: public
int count ()

Implementation of:
Countable::count
current (line 189)

Return the current element.

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

  • return: current element from the collection
  • access: public

Implementation of:
Iterator::current
exists (line 262)

Returns true if $this->count > 0, false otherwise.

Required by interface Countable.

  • access: public
bool exists ()
getTableClass (line 165)

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

  • access: public
string getTableClass ()
key (line 217)

Return the identifying key of the current element.

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

  • access: public
int key ()

Implementation of:
Iterator::key
next (line 229)

Move forward to next element.

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

  • return: The next pointer value.
  • access: public
int next ()

Implementation of:
Iterator::next
rewind (line 177)

Rewind the Iterator to the first element.

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

  • access: public
void rewind ()

Implementation of:
Iterator::rewind
setTable (line 144)

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

  • access: public
  • throws: Zend_Db_Table_Row_Exception
boolean setTable (Zend_Db_Table_Abstract $table)
toArray (line 274)

Returns all data as an array.

Updates the $_data property with current row object values.

  • access: public
array toArray ()
valid (line 241)

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.

  • return: False if there's nothing more to iterate over
  • access: public
bool valid ()

Implementation of:
Iterator::valid
__sleep (line 119)

Store data, class names, and state in serialized object

  • access: public
array __sleep ()
__wakeup (line 131)

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.

  • access: public
void __wakeup ()

Documentation generated on Fri, 06 Apr 2007 18:15:08 -0700 by phpDocumentor 1.3.1