Structures_DataGrid::build (Previous) (Next) Structures_DataGrid::dump

View this page in Last updated: Sun, 28 Sep 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

Structures_DataGrid::dataSourceFactory()

Structures_DataGrid::dataSourceFactory()  -- Datasource driver Factory

Beschreibung

A clever method which loads and instantiate data source drivers.

Can be called in various ways:

Detect the source type and load the appropriate driver with default options:


<?php
$driver =& Structures_DataGrid::dataSourceFactory($source);
?>

Detect the source type and load the appropriate driver with custom options:


<?php
$driver =& Structures_DataGrid::dataSourceFactory($source$options);
?>

Load a driver for an explicit type (faster, bypasses detection routine):


<?php
$driver =& Structures_DataGrid::dataSourceFactory($source$options$type);
?>

Parameter

mixed $source

The data source respective to the driver

array $options

An associative array of the form: array(optionName => optionValue, ...)

string $type

The data source type constant (of the form DATAGRID_SOURCE_*)

Rückgabewert

returns driver object or PEAR_Error on failure

Fehler-Meldungen

throws no exceptions thrown

Siehe auch

see Structures_DataGrid::_detectSourceType()

Hinweise

Diese Methode kann nicht statisch aufgerufen werden.

Structures_DataGrid::build (Previous) (Next) Structures_DataGrid::dump

Download Documentation Last updated: Sun, 28 Sep 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.