Db/Table/Rowset.php
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 [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Db
- Subpackage
- Table
- Version
- $Id: Rowset.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Db_Table_Rowset
Reference concrete class that extends Zend_Db_Table_Rowset_Abstract.
Developers may also create their own classes that extend the abstract class.
- Parent(s)
- \Zend_Db_Table_Rowset_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties


boolean $_connected = true
Connected is true if we have a reference to a live Zend_Db_Table_Abstract object.
Inherited from: \Zend_Db_Table_Rowset_Abstract::$$_connectedThis is false after the Rowset has been deserialized.
true
Details- Type
- boolean
- Inherited_from
- \Zend_Db_Table_Rowset_Abstract::$$_connected


array $_data = array()
array()
Details- Type
- array
- Inherited_from
- \Zend_Db_Table_Rowset_Abstract::$$_data


integer $_pointer = 0
0
Details- Type
- integer
- Inherited_from
- \Zend_Db_Table_Rowset_Abstract::$$_pointer


boolean $_readOnly = false
false
Details- Type
- boolean
- Inherited_from
- \Zend_Db_Table_Rowset_Abstract::$$_readOnly


string $_rowClass = 'Zend_Db_Table_Row'
Zend_Db_Table_Row_Abstract class name.
Inherited from: \Zend_Db_Table_Rowset_Abstract::$$_rowClass'Zend_Db_Table_Row'
Details- Type
- string
- Inherited_from
- \Zend_Db_Table_Rowset_Abstract::$$_rowClass


array $_rows = array()
Collection of instantiated Zend_Db_Table_Row objects.
Inherited from: \Zend_Db_Table_Rowset_Abstract::$$_rowsarray()
Details- Type
- array
- Inherited_from
- \Zend_Db_Table_Rowset_Abstract::$$_rows


boolean $_stored = false
false
Details- Type
- boolean
- Inherited_from
- \Zend_Db_Table_Rowset_Abstract::$$_stored


\Zend_Db_Table_Abstract $_table =
- Type
- \Zend_Db_Table_Abstract
- Inherited_from
- \Zend_Db_Table_Rowset_Abstract::$$_table


string $_tableClass =
Zend_Db_Table_Abstract class name.
Inherited from: \Zend_Db_Table_Rowset_Abstract::$$_tableClass- Type
- string
- Inherited_from
- \Zend_Db_Table_Rowset_Abstract::$$_tableClass
Methods


__sleep() : array
Store data, class names, and state in serialized object
Inherited from: \Zend_Db_Table_Rowset_Abstract::__sleep()Type | Description |
---|---|
array |


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


_loadAndReturnRow( $position) : void
Name | Type | Description |
---|---|---|
$position |


count() : int
Returns the number of elements in the collection.
Inherited from: \Zend_Db_Table_Rowset_Abstract::count()Implements Countable::count()
Type | Description |
---|---|
int |


current() : \Zend_Db_Table_Row_Abstract
Similar to the current() function for arrays in PHP Required by interface Iterator.
Type | Description |
---|---|
\Zend_Db_Table_Row_Abstract | current element from the collection |


getRow(int $position, bool $seek = false) : \Zend_Db_Table_Row
Returns a Zend_Db_Table_Row from a known position into the Iterator
Inherited from: \Zend_Db_Table_Rowset_Abstract::getRow()Name | Type | Description |
---|---|---|
$position | int | the position of the row expected |
$seek | bool | wether or not seek the iterator to that position after |
Type | Description |
---|---|
\Zend_Db_Table_Row |
Exception | Description |
---|---|
\Zend_Db_Table_Rowset_Exception |


getTable() : \Zend_Db_Table_Abstract
Returns the table object, or null if this is disconnected rowset
Inherited from: \Zend_Db_Table_Rowset_Abstract::getTable()Type | Description |
---|---|
\Zend_Db_Table_Abstract |


getTableClass() : string
Query the class name of the Table object for which this Rowset was created.
Inherited from: \Zend_Db_Table_Rowset_Abstract::getTableClass()Type | Description |
---|---|
string |


isConnected() : boolean
Return the connected state of the rowset.
Inherited from: \Zend_Db_Table_Rowset_Abstract::isConnected()Type | Description |
---|---|
boolean |


key() : int
Return the identifying key of the current element.
Inherited from: \Zend_Db_Table_Rowset_Abstract::key()Similar to the key() function for arrays in PHP. Required by interface Iterator.
Type | Description |
---|---|
int |


offsetExists(string $offset) : boolean
Check if an offset exists Required by the ArrayAccess implementation
Inherited from: \Zend_Db_Table_Rowset_Abstract::offsetExists()Name | Type | Description |
---|---|---|
$offset | string |
Type | Description |
---|---|
boolean |


offsetGet(string $offset) : \Zend_Db_Table_Row_Abstract
Get the row for the given offset Required by the ArrayAccess implementation
Inherited from: \Zend_Db_Table_Rowset_Abstract::offsetGet()Name | Type | Description |
---|---|---|
$offset | string |
Type | Description |
---|---|
\Zend_Db_Table_Row_Abstract |


offsetSet(string $offset, mixed $value) : void
Does nothing Required by the ArrayAccess implementation
Inherited from: \Zend_Db_Table_Rowset_Abstract::offsetSet()Name | Type | Description |
---|---|---|
$offset | string | |
$value | mixed |


offsetUnset(string $offset) : void
Does nothing Required by the ArrayAccess implementation
Inherited from: \Zend_Db_Table_Rowset_Abstract::offsetUnset()Name | Type | Description |
---|---|---|
$offset | string |


rewind() : \Zend_Db_Table_Rowset_Abstract
Rewind the Iterator to the first element.
Inherited from: \Zend_Db_Table_Rowset_Abstract::rewind()Similar to the reset() function for arrays in PHP. Required by interface Iterator.
Type | Description |
---|---|
\Zend_Db_Table_Rowset_Abstract | Fluent interface. |


seek(int $position) : \Zend_Db_Table_Rowset_Abstract
Take the Iterator to position $position Required by interface SeekableIterator.
Inherited from: \Zend_Db_Table_Rowset_Abstract::seek()Name | Type | Description |
---|---|---|
$position | int | the position to seek to |
Type | Description |
---|---|
\Zend_Db_Table_Rowset_Abstract |
Exception | Description |
---|---|
\Zend_Db_Table_Rowset_Exception |


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.
Inherited from: \Zend_Db_Table_Rowset_Abstract::setTable()Name | Type | Description |
---|---|---|
$table | \Zend_Db_Table_Abstract |
Type | Description |
---|---|
boolean |
Exception | Description |
---|---|
\Zend_Db_Table_Row_Exception |


toArray() : array
Updates the $_data property with current row object values.
Type | Description |
---|---|
array |


valid() : bool
Check if there is a current element after calls to rewind() or next().
Inherited from: \Zend_Db_Table_Rowset_Abstract::valid()Used to check if we've iterated to the end of the collection. Required by interface Iterator.
Type | Description |
---|---|
bool | False if there's nothing more to iterate over |