Gumbo_Record_Flyweight



Record Flyweight Class

This class will hold a single Gumbo_Record object, reloading the contents with new data supplied by looping through a list of database query rows. Simply loop through the results of a query, passing the next row into this class. The Record object will be properly loaded.

 $fly = new Gumbo_Record_Flyweight (new Gumbo_Record ()); // any Gumbo_Interface_Record Class
 foreach (db_query ("some query") as $res) {
 		$record = $fly->get ($res);
 		// do something
 		...
 }

Author(s): Michael Luster <mluster79@yahoo.com>
License:New BSD License
Copyright:Copyright (c) 2007, iBayou, Michael Luster
Link:http://sourceforge.net/projects/phpgumbo
Version:0.0.1

Implements interfaces:

Class Variables

Gumbo_Interface_Record $_record [line 53]

Class Methods

public Gumbo_Record_Flyweight __construct ( [Gumbo_Interface_Record $record] ) [line 62]

Constructor

Parameter(s):


[ Top ]
public Gumbo_Interface_Record get ( [array $data] ) [line 88]

Returns the Record object, re-loading with the new data

Parameter(s):

  • (array) $data :: associative array of data

[ Top ]
public void setRecord ( $record ) [line 76]

Sets the Record object to use

Parameter(s):


[ Top ]