Class ArrayDataListSource

Description

This DataListSource child class gets the data from an external array

The array is a 2D array and each sub-array is a set of elements for each row in the list

Located in Program_Root/widgets/data_list/ArrayDataListSource.inc (line 26)

DataListSource
   |
   --ArrayDataListSource
Variable Summary
Method Summary
void ArrayDataListSource (array &$data)
void cmp (mixed $data1, mixed $data2)
void do_prequery ()
void do_query ()
boolean prequery_row_filter (array &$row_data)
void set_prequery_filter_flag (bool $flag)
void sort ()
Variables
mixed $_prequery_filter_flag = FALSE (line 33)

If true the prequery filter will be

run on the data array

Inherited Variables

Inherited from DataListSource

DataListSource::$_columns
DataListSource::$_data
DataListSource::$_data_index
DataListSource::$_not_found_message
DataListSource::$_query_params
Methods
Constructor ArrayDataListSource (line 40)

The constructor.

void ArrayDataListSource (array &$data)
  • array &$data:

    data - an array of array elements for each row

cmp (line 169)
void cmp (mixed $data1, mixed $data2)
do_prequery (line 72)

This is a method that should be defined by the child class to do any pre-query type of things.

Such as building a sql query string for a DB, or checking to make sure the file on disk exists if the source is a file on disk.

void do_prequery ()

Redefinition of:
DataListSource::do_prequery()
This is a method that should be defined by the child class to do any pre-query type of things.
do_query (line 48)

This function does the query

and search/sort

void do_query ()

Redefinition of:
DataListSource::do_query()
This is the function that does the data fetching, and sorting if needed.
get_data_index (line 153)

This function returns the data_index value and increments it

int get_data_index ()

Redefinition of:
DataListSource::get_data_index()
This function returns the data_index value and increments it
get_next_data_row (line 81)

This function returns the next row of valid data.

void get_next_data_row ()

Redefinition of:
DataListSource::get_next_data_row()
This function gets the next data row from the query()
prequery_row_filter (line 111)

This is used to perform pre-query filtering Gives us a chance to run the next row through a filter before any processing has been done

  • return:

    - TRUE = allow the row. FALSE = drop it.

boolean prequery_row_filter (array &$row_data)
  • array &$row_data:

    - the row to run through the filter

set_prequery_filter_flag (line 142)

Sets the pre-query filter flag If true, a filter will be run on the data array before any processing is done

void set_prequery_filter_flag (bool $flag)
  • bool $flag:

    flag

sort (line 159)
void sort ()

Redefinition of:
DataListSource::sort()
A generic method API that can be used at the bottom half of the do_query() method to sort data that is stored locally. This is only needed when the source is a non database.
_prequery_filter (line 123)

This is called to allow rebuilding the data array to remove elements that have to be filtered

This is done on pre-processing phase and used for simple and advanced searches

void _prequery_filter ()

Inherited Methods

Inherited From DataListSource

DataListSource::DataListSource()
DataListSource::add_column()
DataListSource::do_prequery()
DataListSource::do_query()
DataListSource::get_data_index()
DataListSource::get_limit()
DataListSource::get_next_data_row()
DataListSource::get_not_found_message()
DataListSource::get_offset()
DataListSource::get_orderby()
DataListSource::get_reverseorder()
DataListSource::get_searchby()
DataListSource::get_searchby_value()
DataListSource::get_search_type()
DataListSource::get_simplesearch_modifier()
DataListSource::get_total_rows()
DataListSource::query()
DataListSource::row_filter()
DataListSource::set_limit()
DataListSource::set_not_found_message()
DataListSource::set_offset()
DataListSource::set_orderby()
DataListSource::set_reverseorder()
DataListSource::set_searchby()
DataListSource::set_searchby_value()
DataListSource::set_search_type()
DataListSource::set_simplesearch_modifier()
DataListSource::set_total_rows()
DataListSource::sort()
DataListSource::_is_column_sortable()

Documention generated on Thu, 31 Jul 2003 18:32:18 -0700 by phpDocumentor 1.2.0