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

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

Structures_DataGrid::dataSourceFactory()

Structures_DataGrid::dataSourceFactory()  -- データソースドライバのファクトリ

説明

データソースドライバの読み込みとインスタンス作成を行う、賢いメソッドです。

さまざまな方法でコールすることができます。

ソースの型を検出し、適切なドライバをデフォルトのオプションで読み込む:


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

ソースの型を検出し、適切なドライバを指定したオプションで読み込む:


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

型を明示的に指定してドライバを読み込む (検出ルーチンを飛ばすため、高速です):


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

パラメータ

mixed $source

ドライバに対応するデータソース。

array $options

array(optionName => optionValue, ...) 形式の連想配列。

string $type

データソースの型を表す定数 (DATAGRID_SOURCE_* 形式)。

返り値

ドライバオブジェクト、あるいは失敗した場合に PEAR_Error を返します。

例外・エラー

例外はスローされません。

参照

Structures_DataGrid::_detectSourceType() も参照ください。

注意

この関数は、スタティックにコールする ことはできません。

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

Download Documentation Last updated: Sun, 05 Oct 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.