DatabaseIterator
[ class tree: DatabaseIterator ] [ index: DatabaseIterator ] [ all elements ]

Class: RowIterator

Source Location: /database_iterator.class.php

Class Overview


Class RowIterator


Author(s):

Version:

  • 0.1

Variables

Methods



Class Details

[line 633]
Class RowIterator

DatabaseIterator use TableIterator, RowIterator and ColumnIterator classes to manipulate database using SPL features. This class implements Iterator and ArrayAccess interfaces; and extends of ArrayObject

  1.  // $conn is an ADOConnection object
  2.  $dbIt new DatabaseIterator($conn);
  3.  $table $dbIt['tablename']// TableIterator
  4.  $table[0]// This object is a RowIterator
  5.  
  6.  $table[0]->field1 'Other string';
  7.  $table[0]->update()// Update into database
  8.  
  9.  $table[0]->delete()// Delete value




Tags:

version:  0.1
see:  TableIterator


[ Top ]


Class Variables

$table =  null

[line 642]



Tags:

access:  public

Type:   TableIterator


[ Top ]

$tablename =  null

[line 637]



Tags:

access:  public
usedby:  RowIterator::__construct()

Type:   string


[ Top ]



Class Methods


constructor __construct [line 656]

RowIterator __construct( TableIterator $table)

Constructor



Tags:

access:  public
uses:  RowIterator::setTable()
uses:  RowIterator::$tablename


Parameters:

TableIterator   $table   Table that contains rows

[ Top ]

method current [line 836]

void current( )



[ Top ]

method delete [line 749]

mixed delete( )

Remove current row of database



Tags:

return:  Return result set for this operation
access:  public


[ Top ]

method execute [line 762]

void execute( string $sql, [array $values = array()])

Perform a SQL query against database



Tags:

access:  public


Parameters:

string   $sql  
array   $values   Array of values to sql data binding

[ Top ]

method insert [line 715]

mixed insert( array $data)

Perform a insert operation into database with $data array. $data must have exact fields to perform operation



Tags:

return:  Return result set for this operation
access:  public


Parameters:

array   $data   Associative array with exact properties for this row

[ Top ]

method key [line 840]

void key( )



[ Top ]

method load [line 676]

void load( array $properties)

Load properties into internal array



Tags:

access:  public


Parameters:

array   $properties  

[ Top ]

method next [line 844]

void next( )



[ Top ]

method offsetExists [line 858]

void offsetExists( $offset)



Tags:

access:  public


Parameters:

   $offset  

[ Top ]

method offsetGet [line 866]

void offsetGet( $offset)



Tags:

access:  public


Parameters:

   $offset  

[ Top ]

method offsetSet [line 853]

void offsetSet( $offset, $value)



Tags:

access:  public


Parameters:

   $offset  
   $value  

[ Top ]

method offsetUnset [line 862]

void offsetUnset( $offset)



Tags:

access:  public


Parameters:

   $offset  

[ Top ]

method rewind [line 832]

void rewind( )



[ Top ]

method setTable [line 667]

void setTable( TableIterator $table)

Set TableIterator object reference



Tags:

access:  public
usedby:  RowIterator::__construct()


Parameters:

TableIterator   $table  

[ Top ]

method update [line 689]

mixed update( )

Dump internal data, for this row, to database



Tags:

return:  Return result set for this operation
access:  public


[ Top ]

method valid [line 848]

void valid( )



[ Top ]

method __get [line 801]

string __get( string $name)

Magic method __get



Tags:

return:  Return data from row for this property
access:  public


Parameters:

string   $name  

[ Top ]

method __set [line 811]

void __set( string $name, string $value)

Magic method __set



Tags:

access:  public


Parameters:

string   $name  
string   $value  

[ Top ]

method __toString [line 820]

void __toString( )

Magic method __toString



Tags:

access:  public


[ Top ]


Documentation generated on Mon, 25 May 2009 19:28:29 +0200 by phpDocumentor 1.4.2