Abstract Class Zend_Db_Table_Rowset_Abstract

Description

Implements interfaces:

  • SeekableIterator (internal interface)
  • Countable (internal interface)
  • ArrayAccess (internal interface)

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

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


	
			
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
 boolean $_readOnly
 string $_rowClass
 array $_rows
 boolean $_stored
 string $_tableClass
Method Summary
 Zend_Db_Table_Rowset_Abstract __construct ( $config)
 int count ()
 Zend_Db_Table_Row getRow (int $position, [bool $seek = false])
 string getTableClass ()
 void init ()
 boolean isConnected ()
 int key ()
 void next ()
 boolean offsetExists (string $offset)
 void offsetSet (string $offset, mixed $value)
 void offsetUnset (string $offset)
 boolean setTable (Zend_Db_Table_Abstract $table)
 array toArray ()
 bool valid ()
 array __sleep ()
 void __wakeup ()
Variables
boolean $_connected = true (line 53)

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

How many data rows there are.

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

The original data for each row.

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

Iterator pointer.

  • access: protected
boolean $_readOnly = false (line 98)
  • access: protected
string $_rowClass = 'Zend_Db_Table_Row' (line 67)

Zend_Db_Table_Row_Abstract class name.

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

Collection of instantiated Zend_Db_Table_Row objects.

  • access: protected
boolean $_stored = false (line 93)
  • access: protected
Zend_Db_Table_Abstract $_table (line 44)

Zend_Db_Table_Abstract object.

  • access: protected
string $_tableClass (line 60)

Zend_Db_Table_Abstract class name.

  • access: protected
Methods
Constructor __construct (line 105)

Constructor.

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

Returns the number of elements in the collection.

Implements Countable::count()

  • access: public
int count ()

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

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:
SeekableIterator::current
getRow (line 386)

Returns a Zend_Db_Table_Row from a known position into the Iterator

  • throws: Zend_Db_Table_Rowset_Exception
  • access: public
Zend_Db_Table_Row getRow (int $position, [bool $seek = false])
  • int $position: the position of the row expected
  • bool $seek: wether or not seek the iterator to that position after
getTable (line 183)

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

  • access: public
getTableClass (line 217)

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

  • access: public
string getTableClass ()
init (line 164)

Initialize object

Called from __construct() as final step of object instantiation.

  • access: public
void init ()
isConnected (line 173)

Return the connected state of the rowset.

  • access: public
boolean isConnected ()
key (line 271)

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:
SeekableIterator::key
next (line 283)

Move forward to next element.

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

  • access: public
void next ()

Implementation of:
SeekableIterator::next
offsetExists (line 338)

Check if an offset exists Required by the ArrayAccess implementation

  • access: public
boolean offsetExists (string $offset)
  • string $offset

Implementation of:
ArrayAccess::offsetExists
offsetGet (line 350)

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

  • access: public
Zend_Db_Table_Row_Abstract offsetGet (string $offset)
  • string $offset

Implementation of:
ArrayAccess::offsetGet
offsetSet (line 364)

Does nothing Required by the ArrayAccess implementation

  • access: public
void offsetSet (string $offset, mixed $value)
  • string $offset
  • mixed $value

Implementation of:
ArrayAccess::offsetSet
offsetUnset (line 374)

Does nothing Required by the ArrayAccess implementation

  • access: public
void offsetUnset (string $offset)
  • string $offset

Implementation of:
ArrayAccess::offsetUnset
rewind (line 229)

Rewind the Iterator to the first element.

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

  • return: Fluent interface.
  • access: public

Implementation of:
SeekableIterator::rewind
seek (line 320)

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

  • throws: Zend_Db_Table_Rowset_Exception
  • access: public
Zend_Db_Table_Rowset_Abstract seek (int $position)
  • int $position: the position to seek to

Implementation of:
SeekableIterator::seek
setTable (line 196)

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

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

Returns all data as an array.

Updates the $_data property with current row object values.

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

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:
SeekableIterator::valid
__sleep (line 139)

Store data, class names, and state in serialized object

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

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 Mon, 21 Jun 2010 15:05:49 -0400 by phpDocumentor 1.4.3