nyroFwk  0.2
Public Member Functions | Protected Member Functions | Protected Attributes
db_rowset Class Reference
Inheritance diagram for db_rowset:
object

Public Member Functions

 getDb ()
 
 getTable ()
 
 getWhere (array $prm=array())
 
 getFields ($mode='flat')
 
 get ($number)
 
 add ($row)
 
 getData ()
 
 rewind ()
 
 current ()
 
 key ()
 
 next ()
 
 valid ()
 
 count ()
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 __toString ()
 
 getAttr ($name)
 
 setAttr ($name, $value)
 
 getCfg ()
 

Protected Member Functions

 afterInit ()
 
 beforeInit ()
 

Protected Attributes

 $_pointer = 0
 
 $_count
 
 $_rows = array()
 
 $fields
 
 $cfg
 

Detailed Description

rowset object for fetching select results

Definition at line 10 of file rowset.class.php.

Member Function Documentation

◆ __toString()

__toString ( )

Definition at line 227 of file rowset.class.php.

◆ add()

add (   $row)

Add a row with a db_row or an array

Parameters
db_row | array$rowThe row to add

Definition at line 105 of file rowset.class.php.

◆ afterInit()

afterInit ( )
protected

Definition at line 40 of file rowset.class.php.

◆ beforeInit()

beforeInit ( )
protectedinherited

Call just before the configuration initialisation

Definition at line 35 of file object.class.php.

◆ count()

count ( )

Returns the number of elements in the collection. Required by interface Countable

Returns
int

Definition at line 178 of file rowset.class.php.

◆ current()

current ( )

Return the current element. Required by interface Iterator.

Returns
db_row current element from the collection

Definition at line 139 of file rowset.class.php.

◆ get()

get (   $number)

Get a specific item of the rowset

Parameters
int$numberIndex of the ement
Returns
db_row Element from the collection

Definition at line 89 of file rowset.class.php.

◆ getAttr()

getAttr (   $name)
inherited

Get an attribute

Parameters
string$nameAttribute name
Returns
mixed|null The attribute or null if not set

Definition at line 48 of file object.class.php.

◆ getCfg()

getCfg ( )
inherited

Get the configuration object

Returns
config

Definition at line 67 of file object.class.php.

◆ getData()

getData ( )

Get the raw data

Returns
array

Definition at line 121 of file rowset.class.php.

◆ getDb()

getDb ( )

Return the db object

Returns
db_abstract

Definition at line 49 of file rowset.class.php.

◆ getFields()

getFields (   $mode = 'flat')

Get the fields

Returns
array

Definition at line 77 of file rowset.class.php.

◆ getTable()

getTable ( )

Return the table object

Returns
db_table

Definition at line 58 of file rowset.class.php.

◆ getWhere()

getWhere ( array  $prm = array())

Get a where object

Parameters
array$prmThe configuration for the where object
Returns
db_where

Definition at line 68 of file rowset.class.php.

◆ key()

key ( )

Return the identifying key of the current element. Required by interface Iterator.

Returns
int

Definition at line 149 of file rowset.class.php.

◆ next()

next ( )

Move forward to next element. Required by interface Iterator.

Definition at line 157 of file rowset.class.php.

◆ offsetExists()

offsetExists (   $offset)

Check if an index exists. Required by interface ArrayAccess

Parameters
int$offset
Returns
bool

Definition at line 189 of file rowset.class.php.

◆ offsetGet()

offsetGet (   $offset)

Get a value. Required by interface ArrayAccess

Parameters
int$offset
Returns
db_row

Definition at line 201 of file rowset.class.php.

◆ offsetSet()

offsetSet (   $offset,
  $value 
)

Set a value. Required by interface ArrayAccess

Parameters
int$offset
db_row$value
Returns
db_row

Definition at line 213 of file rowset.class.php.

◆ offsetUnset()

offsetUnset (   $offset)

Remove an element. Required by interface ArrayAccess

Parameters
int$offset

Definition at line 223 of file rowset.class.php.

◆ rewind()

rewind ( )

Rewind the Iterator to the first element. Required by interface Iterator.

Definition at line 129 of file rowset.class.php.

◆ setAttr()

setAttr (   $name,
  $value 
)
inherited

Set an attribute

Parameters
string$nameAttribute name
mixed$valueAttribute value

Definition at line 58 of file object.class.php.

◆ valid()

valid ( )

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
bool False if there's nothing more to iterate over

Definition at line 168 of file rowset.class.php.

Field Documentation

◆ $_count

$_count
protected

Definition at line 24 of file rowset.class.php.

◆ $_pointer

$_pointer = 0
protected

Definition at line 17 of file rowset.class.php.

◆ $_rows

$_rows = array()
protected

Definition at line 31 of file rowset.class.php.

◆ $cfg

$cfg
protectedinherited

Definition at line 17 of file object.class.php.

◆ $fields

$fields
protected

Definition at line 38 of file rowset.class.php.


The documentation for this class was generated from the following file:
Generated on Sun Oct 15 2017 22:25:20 for nyroFwk by doxygen 1.8.13