function DB_storage::create in Flickr API 5
Static method used to create new DB storage objects.
Parameters
$data assoc. array where the keys are the names: of properties/columns
Return value
object a new instance of DB_storage or a subclass of it
File
- phpFlickr/
PEAR/ DB/ storage.php, line 292
Class
- DB_storage
- Provides an object interface to a table row
Code
function &create($table, &$data) {
$classname = strtolower(get_class($this));
$obj =& new $classname($table);
foreach ($data as $name => $value) {
$obj->_properties[$name] = true;
$obj->{$name} =& $value;
}
return $obj;
}