Miscellaneous | |
PEAR Manual | |
require_once 'Structures/DataGrid.php'; |
Structures_DataGrid_DataSource|PEAR_Error&
Structures_DataGrid::dataSourceFactory
(
mixed
$source
,
array
$options = array()
,
string
$type = NULL
)
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:
|
Detect the source type and load the appropriate driver with custom options:
|
Load a driver for an explicit type (faster, bypasses detection routine):
|
The data source respective to the driver
An associative array of the form: array(optionName => optionValue, ...)
The data source type constant (of the form DATAGRID_SOURCE_*)
returns driver object or PEAR_Error on failure
throws no exceptions thrown
see Structures_DataGrid::_detectSourceType()
This function can not be called statically.
Miscellaneous | |
PEAR Manual | |