This is the base class for managing data for the DataList class. This abstracts away the underlying data layer from the DataList, so the data can come from multiple sources.
Most of the time the data will come from a data base such as Mysql or Oracle. This abstraction enables the data to also come from a tab delimited file, xml, php array
Located in /widgets/data_list/DataListSource.inc (line 31)
Class | Description |
---|---|
ArrayDataListSource | This DataListSource child class gets the data from an external array |
SQLDataListSource |
The column descriptions for the data we are working on
A placeholder for data that is read/built and stored locally. Not all data sources have to use this.
Each entry in the array corresponds to 1 row of data.
Holds the index into the array of data
so we can keep track of where we are when we are walking the array (only usefull for non DB children)
debugging flag for debugging queries.
This holds various parameters relating
to the query of the data
The constructor
Add a column of data to manage
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.
This is the function that does the data fetching, and sorting if needed.
If the source is a sql database, this is where the query gets called. This function doesn't actually read the data from the DB yet. That is what get_next_data_row() does.
This function returns the data_index value and increments it
This function gets the current value of the limit value
This function gets the next data row from the query()
This function returns the value of the offset
This function returns the value of the orderby
This function returns the value of the reverseorder
This function returns the value of the searchby
This function returns the value of the search value
this function returns the current search type for the DataList query
This gets the list of secondary order by columns.
This function returns the value of the search value
This returns the total number of rows in our entire data set
The main Query function.
This function is responsible for doing any data prefetching from a db,file and doing any sorting and searching on it depending on the values passed in from the DataList object
This is called by the DataList object to allow us a chance to run the next row through a filter
This function is used to set the debug level.
This function is used to set
the limit value, which limits the # of rows of data to allow to return
This sets the offset value and resets the index into the data array (in non DB children)
This sets the orderby column name.
This corresponds to the column that wants to be sorted/ordered, but not the actual direction (asc, desc)
This sets the flag that tells us the direction in which to order the orderby column.
This sets the column that we want to search from.
This sets the data that we want to search for.
This function sets the search type (simple or advanced)
This method is used to set a secondary list of columns to order/sort by.
This sets the simple search modifier
This is used to set the total # of rows we have in our data set
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.
It should operate on the $this->_data array
This function determines if the column associated w/ a data_name is sortable or not
Documentation generated on Fri, 28 Jan 2011 08:52:51 -0500 by phpDocumentor 1.4.3