Zend Framework  3.0
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ResultSet Class Reference

Public Member Functions

 __construct ($returnType=self::TYPE_ARRAYOBJECT, $arrayObjectPrototype=null)
 Constructor.
 
 setArrayObjectPrototype ($arrayObjectPrototype)
 Set the row object prototype.
 
 getArrayObjectPrototype ()
 Get the row object prototype.
 
 getReturnType ()
 Get the return type to use when returning objects from the set.
 
- Public Member Functions inherited from AbstractResultSet
 initialize ($dataSource)
 Set the data source for the result set.
 
 buffer ()
 
 isBuffered ()
 
 getDataSource ()
 Get the data source used to create the result set.
 
 getFieldCount ()
 Retrieve count of fields in individual rows of the result set.
 
 next ()
 Iterator: move pointer to next item.
 
 key ()
 Iterator: retrieve current key.
 
 current ()
 Iterator: get current item.
 
 valid ()
 Iterator: is pointer valid?
 
 rewind ()
 Iterator: rewind.
 
 count ()
 Countable: return count of rows.
 
 toArray ()
 Cast result set to array of arrays.
 

Public Attributes

const TYPE_ARRAYOBJECT = 'arrayobject'
 
const TYPE_ARRAY = 'array'
 Return type to use when returning an object from the set.
 

Protected Attributes

 $allowedReturnTypes
 
 $arrayObjectPrototype = null
 
 $returnType = self::TYPE_ARRAYOBJECT
 
- Protected Attributes inherited from AbstractResultSet
 $buffer = null
 
 $count = null
 
 $dataSource = null
 
 $fieldCount = null
 
 $position = 0
 

Constructor & Destructor Documentation

__construct (   $returnType = self::TYPE_ARRAYOBJECT,
  $arrayObjectPrototype = null 
)

Constructor.

Parameters
string$returnType
null | ArrayObject$arrayObjectPrototype

Member Function Documentation

getArrayObjectPrototype ( )

Get the row object prototype.

Returns
ArrayObject
getReturnType ( )

Get the return type to use when returning objects from the set.

Returns
string
setArrayObjectPrototype (   $arrayObjectPrototype)

Set the row object prototype.

Parameters
ArrayObject$arrayObjectPrototype
Exceptions
Exception\InvalidArgumentException
Returns
ResultSet

Member Data Documentation

$allowedReturnTypes
protected
Initial value:
= [
self::TYPE_ARRAYOBJECT,
self::TYPE_ARRAY,
]
$arrayObjectPrototype = null
protected
$returnType = self::TYPE_ARRAYOBJECT
protected
TYPE_ARRAYOBJECT TYPE_ARRAY = 'array'

Return type to use when returning an object from the set.

const TYPE_ARRAYOBJECT = 'arrayobject'