Db/Table/Rowset/Abstract.php

Show: PublicProtectedPrivateinherited
Table of Contents
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.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Db  
Subpackage
Table  
Version
$Id$  

\Zend_Db_Table_Rowset_Abstract

Package: Zend_Db\Table
Implements
Children
\Zend_Db_Table_Rowset
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedboolean $_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.
Default valuetrueDetails
Type
boolean
>VPropertyprotectedinteger $_count
How many data rows there are.
Details
Type
integer
>VPropertyprotectedarray $_data = array()
The original data for each row.
Default valuearray()Details
Type
array
>VPropertyprotectedinteger $_pointer = 0
Iterator pointer.
Default value0Details
Type
integer
>VPropertyprotectedboolean $_readOnly = false
Default valuefalseDetails
Type
boolean
>VPropertyprotectedstring $_rowClass = 'Zend_Db_Table_Row'
Zend_Db_Table_Row_Abstract class name.
Default value'Zend_Db_Table_Row'Details
Type
string
>VPropertyprotectedarray $_rows = array()
Collection of instantiated Zend_Db_Table_Row objects.
Default valuearray()Details
Type
array
>VPropertyprotectedboolean $_stored = false
Default valuefalseDetails
Type
boolean
>VPropertyprotected\Zend_Db_Table_Abstract $_table
Zend_Db_Table_Abstract object.
>VPropertyprotectedstring $_tableClass
Zend_Db_Table_Abstract class name.
Details
Type
string

Methods

methodpublic__construct(array $config) : void

Constructor.

Parameters
NameTypeDescription
$configarray
methodpublic__sleep() : array

Store data, class names, and state in serialized object

Returns
TypeDescription
array
methodpublic__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.
methodprotected_loadAndReturnRow( $position) : void

Parameters
NameTypeDescription
$position
methodpubliccount() : int

Returns the number of elements in the collection.

Implements Countable::count()
Returns
TypeDescription
int
methodpubliccurrent() : \Zend_Db_Table_Row_Abstract

Return the current element.

Similar to the current() function for arrays in PHP Required by interface Iterator.
Returns
TypeDescription
\Zend_Db_Table_Row_Abstractcurrent element from the collection
methodpublicgetRow(int $position, bool $seek = false) : \Zend_Db_Table_Row

Returns a Zend_Db_Table_Row from a known position into the Iterator

Parameters
NameTypeDescription
$positionint

the position of the row expected

$seekbool

wether or not seek the iterator to that position after

Returns
TypeDescription
\Zend_Db_Table_Row
Throws
ExceptionDescription
\Zend_Db_Table_Rowset_Exception
methodpublicgetTable() : \Zend_Db_Table_Abstract

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

Returns
TypeDescription
\Zend_Db_Table_Abstract
methodpublicgetTableClass() : string

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

Returns
TypeDescription
string
methodpublicinit() : void

Initialize object

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

Return the connected state of the rowset.

Returns
TypeDescription
boolean
methodpublickey() : int

Return the identifying key of the current element.

Similar to the key() function for arrays in PHP. Required by interface Iterator.
Returns
TypeDescription
int
methodpublicnext() : void

Move forward to next element.

Similar to the next() function for arrays in PHP. Required by interface Iterator.
methodpublicoffsetExists(string $offset) : boolean

Check if an offset exists Required by the ArrayAccess implementation

Parameters
NameTypeDescription
$offsetstring
Returns
TypeDescription
boolean
methodpublicoffsetGet(string $offset) : \Zend_Db_Table_Row_Abstract

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

Parameters
NameTypeDescription
$offsetstring
Returns
TypeDescription
\Zend_Db_Table_Row_Abstract
methodpublicoffsetSet(string $offset, mixed $value) : void

Does nothing Required by the ArrayAccess implementation

Parameters
NameTypeDescription
$offsetstring
$valuemixed
methodpublicoffsetUnset(string $offset) : void

Does nothing Required by the ArrayAccess implementation

Parameters
NameTypeDescription
$offsetstring
methodpublicrewind() : \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.
Returns
TypeDescription
\Zend_Db_Table_Rowset_AbstractFluent interface.
methodpublicseek(int $position) : \Zend_Db_Table_Rowset_Abstract

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

Parameters
NameTypeDescription
$positionint

the position to seek to

Returns
TypeDescription
\Zend_Db_Table_Rowset_Abstract
Throws
ExceptionDescription
\Zend_Db_Table_Rowset_Exception
methodpublicsetTable(\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.

Parameters
NameTypeDescription
$table\Zend_Db_Table_Abstract
Returns
TypeDescription
boolean
Throws
ExceptionDescription
\Zend_Db_Table_Row_Exception
methodpublictoArray() : array

Returns all data as an array.

Updates the $_data property with current row object values.
Returns
TypeDescription
array
methodpublicvalid() : 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.
Returns
TypeDescription
boolFalse if there's nothing more to iterate over
Documentation was generated by phpDocumentor 2.2.0 .