GetDataProvider('FooDataProvider'); * * Custom data providers should be placed in: * {HOME}/classes/dataProviders and should be named FooDataProvider.class.php. * Custom data providers can be invoked by doing: * $app->GetDataProvider('foo',true); // true --> custom * * @author ahart * */ interface Org_Apache_Oodt_Balance_Interfaces_IApplicationDataProvider { /** * Constructor - Instantiate the provider but do not yet connect * to the underlying data source. * * @param $options array An optional set of configuration values */ public function __construct($options = array()); /** * Initiate a connection to the underlying data source * * @param $options array An optional set of configuration values * @return boolean True or false depending on the result */ public function connect($options = array()); /** * Disconnect from the underlying data source and perform any * cleanup operations necessary. * * @param $options array An optional set of configuration values * @return unknown_type True or false depending on the result */ public function disconnect($options = array()); /** * Request data from the underlying data source. * * @param $request mixed The request itself, usually a string. The nature * of the request is necessarily implementation * specific and will vary across providers. For a * SQL-like relational provider, this will likely be * a "SELECT ..." string. * @param $options array An array of options to configure the request. * These will be implementation-specific and * therefore will likely differ across providers. * @return ApplicationDataResponse The resulting data retrieved */ public function request($request,$options = array()); /** * Send a command to the underlying data source. * * @param $command mixed The command itself, usually a string. The nature * of the command is necessarily implementation * specific and will vary across providers. For a * SQL-like relational provider, this will likely be * a "UPDATE ...", or "CREATE ..." string. * @param $options array An array of options to configure the command. * These will be implementation-specific and * therefore will likely differ across providers. * @return boolean True or false depending on the success of the command */ public function command($command,$options = array()); }