Structures_DataGrid_DataSource::create()

Structures_DataGrid_DataSource::create()

Structures_DataGrid_DataSource::create() -- Creates a Structures_DataGrid_DataSource object

Description

This method will create the datasource driver object by attempting to detect it's type. If the type can be found the driver will be instantiated and returned, if it cannot be detected, an error will be returned. When using bundled data drivers, the bind() method is the preferred approach, this method exists for those who wish to create their own data source driver. If you do create your own driver and find that it may be useful to others, please post it to the mailing list so that it could be bundled into the package.

Parameter

mixed $source

The original data source.

array $options

An array of options to be used, these are respective to the driver.

string $type

Optional. This is used if the data source type cannot be detected.

Return value

object - The Structures_DataGrid_DataSource object

Note

This function can be called statically.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.