Structures_DataGrid_DataSource (Constructor) [line 100]
Structures_DataGrid_DataSource Structures_DataGrid_DataSource(
)
|
|
Constructor
bind [line 287]
object PEAR_Error bind(
mixed
$container, [array
$options = array()])
|
|
Datasource binding method prototype
This method is public, but please note that it is not intended to be called by user-space code. It is meant to be called by the main Structures_DataGrid class.
It is an abstract method, part of the DataGrid Datasource driver interface, and must/may be overloaded by drivers. When overloaded this method must return true on success or a PEAR_Error object on failure.
Overridden in child classes as:
- Structures_DataGrid_DataSource_SQLQuery::bind()
- Bind
Parameters:
count [line 244]
object PEAR_Error count(
)
|
|
Counting method prototype
This method is public, but please note that it is not intended to be called by user-space code. It is meant to be called by the main Structures_DataGrid class.
It is an abstract method, part of the DataGrid Datasource driver interface, and must/may be overloaded by drivers. Note: must be called before fetch()
When overloaded, this method must return the total number or records or a PEAR_Error object on failure
Overridden in child classes as:
- Structures_DataGrid_DataSource_SQLQuery::count()
- Count
delete [line 371]
object PEAR_Error delete(
array
$key)
|
|
Record deletion method prototype
This method is public, but please note that it is not intended to be called by user-space code. It is meant to be called by the main Structures_DataGrid class.
It is an abstract method, part of the DataGrid Datasource driver interface, and must/may be overloaded by drivers. Drivers that support the "writeMode" feature must implement this method.
When overloaded this method must return true on success or a PEAR_Error object on failure.
Parameters:
dump [line 433]
string dump(
[integer
$offset = 0], [integer
$len = null], [string
$sortField = null], [string
$sortDir = 'ASC'])
|
|
Dump the data as returned by fetch().
This method is meant for debugging purposes. It returns what fetch() would return to its DataGrid host as a nicely formatted console-style table.
Parameters:
fetch [line 226]
object PEAR_Error fetch(
[integer
$offset = 0], [integer
$len = null])
|
|
Fetching method prototype
This method is public, but please note that it is not intended to be called by user-space code. It is meant to be called by the main Structures_DataGrid class.
It is an abstract method, part of the DataGrid Datasource driver interface, and must/may be overloaded by drivers. When overloaded this method must return an array of records. Each record can be either an associative array of field name/value pairs, or an object carrying fields as properties.
This method must return a PEAR_Error object on failure.
Overridden in child classes as:
- Structures_DataGrid_DataSource_SQLQuery::fetch()
- Fetch
Parameters:
free [line 387]
Resources cleanup method prototype
This method is public, but please note that it is not intended to be called by user-space code. It is meant to be called by the main Structures_DataGrid class.
It is an abstract method, part of the DataGrid Datasource driver interface, and must/may be overloaded by drivers. This is where drivers should close sql connections, files, etc... if needed.
Overridden in child classes as:
- Structures_DataGrid_DataSource_SQLQuery::free()
- Disconnect from the database, if needed
getColumns [line 180]
Generate columns if options are properly set
Note: must be called after fetch()
getFeatures [line 401]
List special driver features
getPrimaryKey [line 328]
Return the primary key specification
This method is public, but please note that it is not intended to be called by user-space code. It is meant to be called by the main Structures_DataGrid class.
It is an abstract method, part of the DataGrid Datasource driver interface, and must/may be overloaded by drivers. This method always returns an array containing:
- either one field name or index in case of a single-field key
- or several field names or indexes in case of a multiple-fields key
Drivers that support the "writeMode" feature should overload this method if the key can be detected. However, the detection must not override the "primaryKey" option.
hasFeature [line 413]
bool hasFeature(
string
$name)
|
|
Tell if the driver as a specific feature
Parameters:
insert [line 308]
object PEAR_Error insert(
array
$data)
|
|
Record insertion method prototype
This method is public, but please note that it is not intended to be called by user-space code. It is meant to be called by the main Structures_DataGrid class.
It is an abstract method, part of the DataGrid Datasource driver interface, and must/may be overloaded by drivers. Drivers that support the "writeMode" feature must implement this method.
When overloaded this method must return true on success or a PEAR_Error object on failure.
Parameters:
setOption [line 166]
void setOption(
string
$name, mixed
$value)
|
|
Set a single option
Parameters:
setOptions [line 154]
void setOptions(
mixed
$options)
|
|
Set options
Parameters:
sort [line 269]
object PEAR_Error sort(
string
$sortSpec, [string
$sortDir = null])
|
|
Sorting method prototype
This method is public, but please note that it is not intended to be called by user-space code. It is meant to be called by the main Structures_DataGrid class.
It is an abstract method, part of the DataGrid Datasource driver interface, and must/may be overloaded by drivers. When overloaded this method must return true on success or a PEAR_Error object on failure.
Note: must be called before fetch()
Overridden in child classes as:
- Structures_DataGrid_DataSource_SQLQuery::sort()
- This can only be called prior to the fetch method.
Parameters:
update [line 350]
object PEAR_Error update(
array
$key, array
$data)
|
|
Record updating method prototype
This method is public, but please note that it is not intended to be called by user-space code. It is meant to be called by the main Structures_DataGrid class.
It is an abstract method, part of the DataGrid Datasource driver interface, and must/may be overloaded by drivers. Drivers that support the "writeMode" feature must implement this method.
When overloaded this method must return true on success or a PEAR_Error object on failure.
Parameters:
_addDefaultOptions [line 126]
void _addDefaultOptions(
array
$options)
|
|
Adds some default options.
This method is meant to be called by drivers. It allows adding some default options.
Parameters:
_setFeatures [line 142]
void _setFeatures(
array
$features)
|
|
Add special driver features
This method is meant to be called by drivers. It allows specifying the special features that are supported by the current driver.
Parameters: