Structures_DataGrid_DataSource::create()

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

Synopsis

string Structures_DataGrid_DataSource::create (object $source, array $options, string $type)

Описание

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.

Параметр

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.

Возвращаемое значение

object - The Structures_DataGrid_DataSource object

Заметка

Эта функция может быть вызвана статически.

Пример