1 |
jonen |
1.2 |
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN' 'http://www.w3.org/TR/REC-html40/loose.dtd'> |
2 |
jonen |
1.1 |
<!--NewPage--> |
3 |
|
|
<HTML> |
4 |
|
|
<HEAD> |
5 |
jonen |
1.2 |
<!-- Generated by PhpDoc date: 'Thu, 20 Feb 2003 16:22:33 -0800' --> |
6 |
jonen |
1.1 |
<TITLE>Docs For Class CSVFILEDataListSource</TITLE> |
7 |
jonen |
1.2 |
<LINK REL ='stylesheet' TYPE='text/css' HREF='../media/stylesheet.css' TITLE='Style'> |
8 |
jonen |
1.1 |
</HEAD> |
9 |
|
|
<BODY style="background-color: #eeeeee; font-family: arial; font-size: .9em;"> |
10 |
|
|
<!-- Links --> |
11 |
|
|
<a NAME="top"></A> |
12 |
|
|
<table WIDTH="100%" class="links"> |
13 |
|
|
<TR> |
14 |
|
|
<TD class="font10"> |
15 |
|
|
Links: |
16 |
|
|
<A HREF="#children_summary" class="links" title="Classes extended from CSVFILEDataListSource">Child Classes</A> |
17 |
|
|
<A HREF="#var_summary" class="links" title="Class Variable Summary">Variables</A> |
18 |
|
|
<A HREF="#var_inherited_summary" class="links" title="Inherited Class Variable Summary">Inherited Variables</A> |
19 |
jonen |
1.2 |
<A HREF="#functions_inherited" class="links" title="Inherited Method Summary">Inherited Methods</A> |
20 |
|
|
<A HREF="#method_summary" class="links" title="Method Summary">Methods</A> |
21 |
jonen |
1.1 |
<A HREF="#variable_detail" class="links" title="Variable Detail">Variable Detail</A> |
22 |
jonen |
1.2 |
<A HREF="#method_detail" class="links" title="Method Detail">Method Detail</A> |
23 |
jonen |
1.1 |
</TD> |
24 |
|
|
</TR> |
25 |
|
|
</TABLE> |
26 |
|
|
<BR> |
27 |
|
|
<!-- Start of Class Data --> |
28 |
|
|
<H2> |
29 |
|
|
Class CSVFILEDataListSource |
30 |
jonen |
1.2 |
</H2> (line <span class="linenumber">31</span>) |
31 |
jonen |
1.1 |
<pre> |
32 |
jonen |
1.2 |
<a href="../phpHtmlLib/DataListSource.html">DataListSource</a> |
33 |
jonen |
1.1 |
| |
34 |
|
|
--CSVFILEDataListSource</pre> |
35 |
|
|
<p> |
36 |
|
|
<b><i>Located in File: Program_Root/widgets/data_list/CSVFILEDataListSource.inc</i></b><br> |
37 |
|
|
</p> |
38 |
|
|
<hr> |
39 |
jonen |
1.2 |
This DataListSource child class gets the data from a CSV (comma seperated values) file on disk. |
40 |
|
|
<br /> |
41 |
|
|
<p>The CSV MUST have a 'header' line before any data. The 'header' line is a CSV line that provides a name for each column of data in the file.</p><p>All lines that start with '#' or '//' are ignored as comments.</p> |
42 |
jonen |
1.1 |
<UL> |
43 |
jonen |
1.2 |
<LI><b>author</b> - <CODE>Walter A. Boring IV <<a href="mailto:waboring@buildabetterweb.com">mailto:waboring@buildabetterweb.com</a>></CODE></LI> |
44 |
|
|
</UL> |
45 |
jonen |
1.1 |
<hr> |
46 |
|
|
<!-- =========== VAR SUMMARY =========== --> |
47 |
|
|
<A NAME='var_summary'><!-- --></A> |
48 |
|
|
<TABLE CELLPADDING='3' CELLSPACING='0' WIDTH='100%' CLASS="border"> |
49 |
|
|
<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> |
50 |
|
|
<TD> |
51 |
|
|
<span CLASS="font12bold">Class Variable Summary</span> |
52 |
|
|
<A HREF="#top" CLASS="links">^TOP</A> |
53 |
|
|
</TD> |
54 |
|
|
</TR> |
55 |
|
|
|
56 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
57 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
58 |
|
|
<TD> |
59 |
jonen |
1.2 |
<CODE><B><A HREF="../phpHtmlLib/CSVFILEDataListSource.html#var$_csv_headers">$_csv_headers</A></B></CODE> |
60 |
jonen |
1.1 |
<BR> |
61 |
|
|
<blockquote> this holds the headers read </blockquote> |
62 |
|
|
<blockquote> Default Value: <CODE>->array()<-</CODE> </blockquote> |
63 |
|
|
</TD> |
64 |
|
|
</TR> |
65 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
66 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
67 |
|
|
<TD> |
68 |
jonen |
1.2 |
<CODE><B><A HREF="../phpHtmlLib/CSVFILEDataListSource.html#var$_filename">$_filename</A></B></CODE> |
69 |
jonen |
1.1 |
<BR> |
70 |
|
|
<blockquote> The csv file name/path on disk </blockquote> |
71 |
jonen |
1.2 |
<blockquote> Default Value: <CODE>-> NULL<-</CODE> </blockquote> |
72 |
jonen |
1.1 |
</TD> |
73 |
|
|
</TR> |
74 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
75 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
76 |
|
|
<TD> |
77 |
jonen |
1.2 |
<CODE><B><A HREF="../phpHtmlLib/CSVFILEDataListSource.html#var$_fp">$_fp</A></B></CODE> |
78 |
jonen |
1.1 |
<BR> |
79 |
|
|
<blockquote> The file descriptor pointer </blockquote> |
80 |
jonen |
1.2 |
<blockquote> Default Value: <CODE>-> NULL<-</CODE> </blockquote> |
81 |
jonen |
1.1 |
</TD> |
82 |
|
|
</TR> |
83 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
84 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
85 |
|
|
<TD> |
86 |
jonen |
1.2 |
<CODE><B><A HREF="../phpHtmlLib/CSVFILEDataListSource.html#var$_maxlinelength">$_maxlinelength</A></B></CODE> |
87 |
jonen |
1.1 |
<BR> |
88 |
|
|
<blockquote> The length of the longest </blockquote> |
89 |
|
|
<blockquote> Default Value: <CODE>->4096<-</CODE> </blockquote> |
90 |
|
|
</TD> |
91 |
|
|
</TR> |
92 |
jonen |
1.2 |
</TABLE> |
93 |
jonen |
1.1 |
<hr> |
94 |
|
|
<!-- =========== VAR INHERITED SUMMARY =========== --> |
95 |
|
|
<A NAME='var_inherited_summary'><!-- --></A> |
96 |
|
|
<TABLE CELLPADDING='3' CELLSPACING='0' WIDTH='100%' CLASS="border"> |
97 |
jonen |
1.2 |
<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> |
98 |
jonen |
1.1 |
<TD> |
99 |
|
|
<span CLASS="font12bold">Inherited Class Variable Summary</span> |
100 |
|
|
<A HREF="#top" CLASS="links">^TOP</A> |
101 |
|
|
</TD> |
102 |
|
|
</TR> |
103 |
|
|
|
104 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
105 |
jonen |
1.1 |
<TR BGCOLOR='white'> |
106 |
|
|
<TD> |
107 |
|
|
<span CLASS="font10bold">Inherited From Class <a href="../phpHtmlLib/DataListSource.html">DataListSource</a></span> |
108 |
|
|
<table CELLPADDING='3' CELLSPACING='0' WIDTH='95%' CLASS="border" ALIGN="center"> |
109 |
|
|
<tr CLASS="tableheadingcolor"> |
110 |
|
|
<th>Variable</th> |
111 |
|
|
<th>Default Value</th> |
112 |
|
|
<th>Description</th> |
113 |
|
|
</tr> |
114 |
jonen |
1.2 |
<tr> |
115 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#var$_columns">DataListSource::$_columns</a></td> |
116 |
jonen |
1.1 |
<td CLASS="font10" STYLE="white-space: nowrap">->array()<-</td> |
117 |
jonen |
1.2 |
<td CLASS="font10">The column descriptions for the data we are working on</td> |
118 |
jonen |
1.1 |
</tr> |
119 |
jonen |
1.2 |
<tr> |
120 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#var$_data">DataListSource::$_data</a></td> |
121 |
jonen |
1.1 |
<td CLASS="font10" STYLE="white-space: nowrap">->array()<-</td> |
122 |
jonen |
1.2 |
<td CLASS="font10">A placeholder for data that is read/built and stored locally. Not all data sources have to use this.</td> |
123 |
jonen |
1.1 |
</tr> |
124 |
jonen |
1.2 |
<tr> |
125 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#var$_data_index">DataListSource::$_data_index</a></td> |
126 |
|
|
<td CLASS="font10" STYLE="white-space: nowrap">-> 0<-</td> |
127 |
jonen |
1.1 |
<td CLASS="font10">Holds the index into the array of data</td> |
128 |
|
|
</tr> |
129 |
jonen |
1.2 |
<tr> |
130 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#var$_not_found_message">DataListSource::$_not_found_message</a></td> |
131 |
|
|
<td CLASS="font10" STYLE="white-space: nowrap">-> "No data was found"<-</td> |
132 |
jonen |
1.1 |
<td CLASS="font10">This is the message displayed when no data</td> |
133 |
|
|
</tr> |
134 |
jonen |
1.2 |
<tr> |
135 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#var$_query_params">DataListSource::$_query_params</a></td> |
136 |
|
|
<td CLASS="font10" STYLE="white-space: nowrap">->array("num_total_rows" => 0, |
137 |
|
|
"offset" => 0, |
138 |
|
|
"limit" => -1, |
139 |
|
|
"orderby" => '', |
140 |
|
|
"reverseorder" => '', |
141 |
|
|
"searchby" => '', |
142 |
|
|
"searchvalue" => '', |
143 |
|
|
"searchmodifier" => '', |
144 |
|
|
"searchtype" => 'simple')<-</td> |
145 |
|
|
<td CLASS="font10">This holds various parameters relating</td> |
146 |
jonen |
1.1 |
</tr> |
147 |
jonen |
1.2 |
</table> |
148 |
jonen |
1.1 |
<BR> |
149 |
|
|
</TD> |
150 |
|
|
</TR> |
151 |
jonen |
1.2 |
</TABLE> |
152 |
jonen |
1.1 |
|
153 |
|
|
<hr> |
154 |
jonen |
1.2 |
<!-- =========== METHOD SUMMARY =========== --> |
155 |
|
|
<A NAME='method_summary'><!-- --></A> |
156 |
jonen |
1.1 |
<TABLE CELLPADDING='3' CELLSPACING='0' WIDTH='100%' Class="border"> |
157 |
|
|
<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> |
158 |
|
|
<TD> |
159 |
|
|
<span class="font12bold">Method Summary</span> |
160 |
|
|
<A HREF="#top" CLASS="links">^TOP</A> |
161 |
|
|
</TD> |
162 |
|
|
</TR> |
163 |
|
|
|
164 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
165 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
166 |
|
|
<TD> |
167 |
jonen |
1.2 |
<CODE><B><A HREF='../phpHtmlLib/CSVFILEDataListSource.html#methodCSVFILEDataListSource'>void constructor CSVFILEDataListSource ( $filename, [$maxline = 4096] )</A></B></CODE> |
168 |
jonen |
1.1 |
<BR> |
169 |
|
|
<blockquote> The constructor. </blockquote> |
170 |
|
|
</TD> |
171 |
|
|
</TR> |
172 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
173 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
174 |
|
|
<TD> |
175 |
jonen |
1.2 |
<CODE><B><A HREF='../phpHtmlLib/CSVFILEDataListSource.html#methodadd_data_row'>void add_data_row ( $row )</A></B></CODE> |
176 |
jonen |
1.1 |
<BR> |
177 |
jonen |
1.2 |
<blockquote> This function adds a row of data </blockquote> |
178 |
jonen |
1.1 |
</TD> |
179 |
|
|
</TR> |
180 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
181 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
182 |
|
|
<TD> |
183 |
jonen |
1.2 |
<CODE><B><A HREF='../phpHtmlLib/CSVFILEDataListSource.html#methodcmp'>void cmp ( $data1, $data2 )</A></B></CODE> |
184 |
jonen |
1.1 |
<BR> |
185 |
|
|
<blockquote> </blockquote> |
186 |
|
|
</TD> |
187 |
|
|
</TR> |
188 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
189 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
190 |
|
|
<TD> |
191 |
jonen |
1.2 |
<CODE><B><A HREF='../phpHtmlLib/CSVFILEDataListSource.html#methoddo_prequery'>void do_prequery ( )</A></B></CODE> |
192 |
jonen |
1.1 |
<BR> |
193 |
jonen |
1.2 |
<blockquote> The prequery. We use this to read the file </blockquote> |
194 |
jonen |
1.1 |
</TD> |
195 |
|
|
</TR> |
196 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
197 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
198 |
|
|
<TD> |
199 |
jonen |
1.2 |
<CODE><B><A HREF='../phpHtmlLib/CSVFILEDataListSource.html#methoddo_query'>void do_query ( )</A></B></CODE> |
200 |
jonen |
1.1 |
<BR> |
201 |
|
|
<blockquote> This function does the query </blockquote> |
202 |
|
|
</TD> |
203 |
|
|
</TR> |
204 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
205 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
206 |
|
|
<TD> |
207 |
jonen |
1.2 |
<CODE><B><A HREF='../phpHtmlLib/CSVFILEDataListSource.html#methodget_next_data_row'>void get_next_data_row ( )</A></B></CODE> |
208 |
jonen |
1.1 |
<BR> |
209 |
jonen |
1.2 |
<blockquote> This function returns the next row of valid data. </blockquote> |
210 |
jonen |
1.1 |
</TD> |
211 |
|
|
</TR> |
212 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
213 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
214 |
|
|
<TD> |
215 |
jonen |
1.2 |
<CODE><B><A HREF='../phpHtmlLib/CSVFILEDataListSource.html#methodsort'>void sort ( )</A></B></CODE> |
216 |
jonen |
1.1 |
<BR> |
217 |
|
|
<blockquote> </blockquote> |
218 |
|
|
</TD> |
219 |
|
|
</TR> |
220 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
221 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
222 |
|
|
<TD> |
223 |
jonen |
1.2 |
<CODE><B><A HREF='../phpHtmlLib/CSVFILEDataListSource.html#method_construct_row'>array _construct_row ( $line )</A></B></CODE> |
224 |
jonen |
1.1 |
<BR> |
225 |
jonen |
1.2 |
<blockquote> this is used to build a row from a csv line </blockquote> |
226 |
jonen |
1.1 |
</TD> |
227 |
|
|
</TR> |
228 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
229 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
230 |
|
|
<TD> |
231 |
jonen |
1.2 |
<CODE><B><A HREF='../phpHtmlLib/CSVFILEDataListSource.html#method_find_data'>void _find_data ( $row_data )</A></B></CODE> |
232 |
jonen |
1.1 |
<BR> |
233 |
|
|
<blockquote> </blockquote> |
234 |
|
|
</TD> |
235 |
|
|
</TR> |
236 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
237 |
jonen |
1.1 |
<TR BGCOLOR='white' CLASS='TableRowColor'> |
238 |
|
|
<TD> |
239 |
jonen |
1.2 |
<CODE><B><A HREF='../phpHtmlLib/CSVFILEDataListSource.html#method_get_header'>void _get_header ( )</A></B></CODE> |
240 |
jonen |
1.1 |
<BR> |
241 |
|
|
<blockquote> This file trys to get the CSV header. </blockquote> |
242 |
|
|
</TD> |
243 |
|
|
</TR> |
244 |
jonen |
1.2 |
</TABLE> |
245 |
|
|
<!-- =========== INHERITED METHOD SUMMARY =========== --> |
246 |
|
|
<A NAME='functions_inherited'><!-- --></A> |
247 |
|
|
<TABLE CELLPADDING='3' CELLSPACING='0' WIDTH='100%' CLASS="border"> |
248 |
|
|
<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> |
249 |
|
|
<TD> |
250 |
|
|
<span CLASS="font12bold">Inherited Method Summary</span> |
251 |
|
|
<A HREF="#top" CLASS="links">^TOP</A> |
252 |
|
|
</TD> |
253 |
|
|
</TR> |
254 |
jonen |
1.1 |
|
255 |
jonen |
1.2 |
<!-- =========== Summary =========== --> |
256 |
|
|
<TR BGCOLOR='white' CLASS='TableRowColor'> |
257 |
|
|
<TD> |
258 |
|
|
<span CLASS="font10bold">Inherited From Class <a href="../phpHtmlLib/DataListSource.html">DataListSource</a></span> |
259 |
|
|
<TABLE CELLPADDING='3' CELLSPACING='0' WIDTH='95%' CLASS="border" ALIGN="center"> |
260 |
|
|
<tr CLASS="tableheadingcolor"> |
261 |
|
|
<th>Function</th> |
262 |
|
|
<th>Description</th> |
263 |
|
|
</tr> |
264 |
|
|
<tr> |
265 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodDataListSource">DataListSource::DataListSource()</a></td> |
266 |
|
|
<td CLASS="font10">The constructor</td> |
267 |
|
|
<tr> |
268 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodadd_column">DataListSource::add_column()</a></td> |
269 |
|
|
<td CLASS="font10">Add a column of data to manage</td> |
270 |
|
|
<tr> |
271 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methoddo_prequery">DataListSource::do_prequery()</a></td> |
272 |
|
|
<td CLASS="font10">This is a method that should be defined by the child class to do any pre-query type of things.</td> |
273 |
|
|
<tr> |
274 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methoddo_query">DataListSource::do_query()</a></td> |
275 |
|
|
<td CLASS="font10">This is the function that does the data fetching, and sorting if needed.</td> |
276 |
|
|
<tr> |
277 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_data_index">DataListSource::get_data_index()</a></td> |
278 |
|
|
<td CLASS="font10">This function returns the data_index value and increments it</td> |
279 |
|
|
<tr> |
280 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_limit">DataListSource::get_limit()</a></td> |
281 |
|
|
<td CLASS="font10">This function gets the current value of the limit value</td> |
282 |
|
|
<tr> |
283 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_next_data_row">DataListSource::get_next_data_row()</a></td> |
284 |
|
|
<td CLASS="font10">This function gets the next data row from the query()</td> |
285 |
|
|
<tr> |
286 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_not_found_message">DataListSource::get_not_found_message()</a></td> |
287 |
|
|
<td CLASS="font10">This function is used to get the message displayed when no data is found</td> |
288 |
|
|
<tr> |
289 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_offset">DataListSource::get_offset()</a></td> |
290 |
|
|
<td CLASS="font10">This function returns the value of the offset</td> |
291 |
|
|
<tr> |
292 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_orderby">DataListSource::get_orderby()</a></td> |
293 |
|
|
<td CLASS="font10">This function returns the value of the orderby</td> |
294 |
|
|
<tr> |
295 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_reverseorder">DataListSource::get_reverseorder()</a></td> |
296 |
|
|
<td CLASS="font10">This function returns the value of the reverseorder</td> |
297 |
|
|
<tr> |
298 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_searchby">DataListSource::get_searchby()</a></td> |
299 |
|
|
<td CLASS="font10">This function returns the value of the searchby</td> |
300 |
|
|
<tr> |
301 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_searchby_value">DataListSource::get_searchby_value()</a></td> |
302 |
|
|
<td CLASS="font10">This function returns the value of the search value</td> |
303 |
|
|
<tr> |
304 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_search_type">DataListSource::get_search_type()</a></td> |
305 |
|
|
<td CLASS="font10">this function returns the current search type for the DataList query</td> |
306 |
|
|
<tr> |
307 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_simplesearch_modifier">DataListSource::get_simplesearch_modifier()</a></td> |
308 |
|
|
<td CLASS="font10">This function returns the value of the search value</td> |
309 |
|
|
<tr> |
310 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodget_total_rows">DataListSource::get_total_rows()</a></td> |
311 |
|
|
<td CLASS="font10">This returns the total number of rows in our entire data set</td> |
312 |
|
|
<tr> |
313 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodquery">DataListSource::query()</a></td> |
314 |
|
|
<td CLASS="font10">The main Query function.</td> |
315 |
|
|
<tr> |
316 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodset_limit">DataListSource::set_limit()</a></td> |
317 |
|
|
<td CLASS="font10">This function is used to set</td> |
318 |
|
|
<tr> |
319 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodset_not_found_message">DataListSource::set_not_found_message()</a></td> |
320 |
|
|
<td CLASS="font10">This function is used to set the message displayed when no data is found</td> |
321 |
|
|
<tr> |
322 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodset_offset">DataListSource::set_offset()</a></td> |
323 |
|
|
<td CLASS="font10">This sets the offset value and resets the index into the data array (in non DB children)</td> |
324 |
|
|
<tr> |
325 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodset_orderby">DataListSource::set_orderby()</a></td> |
326 |
|
|
<td CLASS="font10">This sets the orderby column name.</td> |
327 |
|
|
<tr> |
328 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodset_reverseorder">DataListSource::set_reverseorder()</a></td> |
329 |
|
|
<td CLASS="font10">This sets the flag that tells us the direction in which to order the orderby column.</td> |
330 |
|
|
<tr> |
331 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodset_searchby">DataListSource::set_searchby()</a></td> |
332 |
|
|
<td CLASS="font10">This sets the column that we want to search from.</td> |
333 |
|
|
<tr> |
334 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodset_searchby_value">DataListSource::set_searchby_value()</a></td> |
335 |
|
|
<td CLASS="font10">This sets the data that we want to search for.</td> |
336 |
|
|
<tr> |
337 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodset_search_type">DataListSource::set_search_type()</a></td> |
338 |
|
|
<td CLASS="font10">This function sets the search type (simple or advanced)</td> |
339 |
|
|
<tr> |
340 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodset_simplesearch_modifier">DataListSource::set_simplesearch_modifier()</a></td> |
341 |
|
|
<td CLASS="font10">This sets the simple search modifier</td> |
342 |
|
|
<tr> |
343 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodset_total_rows">DataListSource::set_total_rows()</a></td> |
344 |
|
|
<td CLASS="font10">This is used to set the total # of rows we have in our data set</td> |
345 |
|
|
<tr> |
346 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#methodsort">DataListSource::sort()</a></td> |
347 |
|
|
<td CLASS="font10">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.</td> |
348 |
|
|
<tr> |
349 |
|
|
<td CLASS="font10bold"><a href="../phpHtmlLib/DataListSource.html#method_is_column_sortable">DataListSource::_is_column_sortable()</a></td> |
350 |
|
|
<td CLASS="font10">This function determines if the column associated w/ a data_name is sortable or not</td> |
351 |
|
|
</table> |
352 |
|
|
<br> |
353 |
|
|
</TD> |
354 |
|
|
</TR> |
355 |
|
|
</TABLE> |
356 |
jonen |
1.1 |
<hr> |
357 |
|
|
<!-- ============ VARIABLE DETAIL =========== --> |
358 |
|
|
|
359 |
|
|
<A NAME='variable_detail'></A> |
360 |
|
|
<TABLE CELLPADDING='3' CELLSPACING='0' WIDTH='100%' CLASS="border"> |
361 |
|
|
<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> |
362 |
|
|
<TD> |
363 |
|
|
<span CLASS="font12bold">Variable Detail</span> |
364 |
|
|
<A HREF="#top" CLASS="links">^TOP</A> |
365 |
|
|
</TD> |
366 |
|
|
</TR> |
367 |
|
|
</TABLE> |
368 |
|
|
|
369 |
jonen |
1.2 |
<A NAME='var$_csv_headers'><!-- --></A><H3>$_csv_headers</H3> (line <span class="linenumber">51</span>)<br /> |
370 |
|
|
<b>Data type:</b> mixed<br>this holds the headers read |
371 |
|
|
<br /> |
372 |
|
|
<p>from the top of the csv file</p> |
373 |
jonen |
1.1 |
<UL> |
374 |
jonen |
1.2 |
</UL> |
375 |
jonen |
1.1 |
<HR> |
376 |
jonen |
1.2 |
<A NAME='var$_filename'><!-- --></A><H3>$_filename</H3> (line <span class="linenumber">38</span>)<br /> |
377 |
|
|
<b>Data type:</b> mixed<br>The csv file name/path on disk |
378 |
|
|
<br /> |
379 |
jonen |
1.1 |
|
380 |
|
|
<UL> |
381 |
jonen |
1.2 |
</UL> |
382 |
jonen |
1.1 |
<HR> |
383 |
jonen |
1.2 |
<A NAME='var$_fp'><!-- --></A><H3>$_fp</H3> (line <span class="linenumber">44</span>)<br /> |
384 |
|
|
<b>Data type:</b> mixed<br>The file descriptor pointer |
385 |
|
|
<br /> |
386 |
jonen |
1.1 |
|
387 |
|
|
<UL> |
388 |
jonen |
1.2 |
</UL> |
389 |
jonen |
1.1 |
<HR> |
390 |
jonen |
1.2 |
<A NAME='var$_maxlinelength'><!-- --></A><H3>$_maxlinelength</H3> (line <span class="linenumber">58</span>)<br /> |
391 |
|
|
<b>Data type:</b> mixed<br>The length of the longest |
392 |
|
|
<br /> |
393 |
|
|
<p>line in the csv file (so we read the line properly)</p> |
394 |
jonen |
1.1 |
<UL> |
395 |
jonen |
1.2 |
</UL> |
396 |
jonen |
1.1 |
<HR> |
397 |
|
|
<hr> |
398 |
jonen |
1.2 |
<!-- ============ METHOD DETAIL =========== --> |
399 |
jonen |
1.1 |
|
400 |
jonen |
1.2 |
<A NAME='method_detail'></A> |
401 |
jonen |
1.1 |
<TABLE CELLPADDING='3' CELLSPACING='0' WIDTH='100%' CLASS="border"> |
402 |
|
|
<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'> |
403 |
|
|
<TD> |
404 |
|
|
<span class="font12bold">Method Detail</span> |
405 |
|
|
<A HREF="#top" CLASS="links">^TOP</A> |
406 |
|
|
</TD> |
407 |
|
|
</TR> |
408 |
|
|
</TABLE> |
409 |
|
|
<BR> |
410 |
|
|
<DIV CLASS="function"> |
411 |
jonen |
1.2 |
<A NAME='methodCSVFILEDataListSource'><!-- --></A> |
412 |
|
|
<SPAN CLASS="font12bold">Constructor CSVFILEDataListSource</SPAN> (line <span class="linenumber">69</span>) |
413 |
jonen |
1.1 |
<BR> |
414 |
jonen |
1.2 |
<SPAN CLASS="font10bold">Usage : </SPAN> |
415 |
jonen |
1.1 |
<span class="font10bold" style="color: #FF0000">void</SPAN> |
416 |
jonen |
1.2 |
<span class="font10bold" style="color: #0000FF">CSVFILEDataListSource( |
417 |
|
|
string |
418 |
|
|
$filename, [mixed |
419 |
|
|
$maxline = 4096])</SPAN> |
420 |
jonen |
1.1 |
<BR> |
421 |
|
|
|
422 |
|
|
<BR> |
423 |
|
|
<SPAN CLASS="font10bold">Description : </SPAN> |
424 |
|
|
The constructor. |
425 |
jonen |
1.2 |
<br /> |
426 |
jonen |
1.1 |
|
427 |
|
|
<DL> |
428 |
jonen |
1.2 |
<DT class="font10bold">Function Parameters:</DT> |
429 |
|
|
<DD CLASS="font10" STYLE="padding-bottom:5px;"><span STYLE="font-style: italic;">- <span style="color: #FF0000;font-weight:bold;">string</SPAN> <span style="color: #0000FF;font-weight:bold">$filename</SPAN></SPAN> - the path to the CSV file on on disk to use as the data source.</DD> |
430 |
|
|
|
431 |
|
|
<DT class="font10bold">Function Info:</DT> |
432 |
|
|
</DL> |
433 |
jonen |
1.1 |
</DIV> |
434 |
|
|
<BR> |
435 |
|
|
<DIV CLASS="function"> |
436 |
jonen |
1.2 |
<A NAME='methodadd_data_row'><!-- --></A> |
437 |
|
|
<SPAN CLASS="font12bold">add_data_row</SPAN> (line <span class="linenumber">186</span>) |
438 |
jonen |
1.1 |
<BR> |
439 |
jonen |
1.2 |
<SPAN CLASS="font10bold">Usage : </SPAN> |
440 |
jonen |
1.1 |
<span class="font10bold" style="color: #FF0000">void</SPAN> |
441 |
jonen |
1.2 |
<span class="font10bold" style="color: #0000FF">add_data_row( |
442 |
|
|
mixed |
443 |
|
|
$row)</SPAN> |
444 |
jonen |
1.1 |
<BR> |
445 |
|
|
|
446 |
|
|
<BR> |
447 |
|
|
<SPAN CLASS="font10bold">Description : </SPAN> |
448 |
|
|
This function adds a row of data |
449 |
jonen |
1.2 |
<br /> |
450 |
|
|
<p>if necesarry to the data array</p> |
451 |
jonen |
1.1 |
<DL> |
452 |
|
|
|
453 |
jonen |
1.2 |
<DT class="font10bold">Function Info:</DT> |
454 |
|
|
</DL> |
455 |
jonen |
1.1 |
</DIV> |
456 |
|
|
<BR> |
457 |
|
|
<DIV CLASS="function"> |
458 |
jonen |
1.2 |
<A NAME='methodcmp'><!-- --></A> |
459 |
|
|
<SPAN CLASS="font12bold">cmp</SPAN> (line <span class="linenumber">215</span>) |
460 |
jonen |
1.1 |
<BR> |
461 |
jonen |
1.2 |
<SPAN CLASS="font10bold">Usage : </SPAN> |
462 |
jonen |
1.1 |
<span class="font10bold" style="color: #FF0000">void</SPAN> |
463 |
jonen |
1.2 |
<span class="font10bold" style="color: #0000FF">cmp( |
464 |
|
|
mixed |
465 |
|
|
$data1, mixed |
466 |
|
|
$data2)</SPAN> |
467 |
jonen |
1.1 |
<BR> |
468 |
|
|
|
469 |
|
|
<BR> |
470 |
|
|
<SPAN CLASS="font10bold">Description : </SPAN> |
471 |
|
|
|
472 |
jonen |
1.2 |
<br /> |
473 |
jonen |
1.1 |
|
474 |
|
|
<DL> |
475 |
|
|
|
476 |
jonen |
1.2 |
<DT class="font10bold">Function Info:</DT> |
477 |
|
|
</DL> |
478 |
jonen |
1.1 |
</DIV> |
479 |
|
|
<BR> |
480 |
|
|
<DIV CLASS="function"> |
481 |
jonen |
1.2 |
<A NAME='methoddo_prequery'><!-- --></A> |
482 |
|
|
<SPAN CLASS="font12bold">do_prequery</SPAN> (line <span class="linenumber">90</span>) |
483 |
jonen |
1.1 |
<BR> |
484 |
jonen |
1.2 |
<SPAN CLASS="font10bold">Usage : </SPAN> |
485 |
jonen |
1.1 |
<span class="font10bold" style="color: #FF0000">void</SPAN> |
486 |
jonen |
1.2 |
<span class="font10bold" style="color: #0000FF">do_prequery( |
487 |
|
|
)</SPAN> |
488 |
jonen |
1.1 |
<BR> |
489 |
jonen |
1.2 |
|
490 |
|
|
<span class="font10bold" style="padding-left: 10px;">Overrides :</span> <a href="../phpHtmlLib/DataListSource.html#methoddo_prequery">DataListSource::do_prequery()</a> This is a method that should be defined by the child class to do any pre-query type of things. |
491 |
jonen |
1.1 |
<BR> |
492 |
|
|
<SPAN CLASS="font10bold">Description : </SPAN> |
493 |
jonen |
1.2 |
The prequery. We use this to read the file |
494 |
|
|
<br /> |
495 |
|
|
<p>into memory so we can do operations on the data (search, sort, etc.)</p> |
496 |
jonen |
1.1 |
<DL> |
497 |
|
|
|
498 |
jonen |
1.2 |
<DT class="font10bold">Function Info:</DT> |
499 |
|
|
</DL> |
500 |
jonen |
1.1 |
</DIV> |
501 |
|
|
<BR> |
502 |
|
|
<DIV CLASS="function"> |
503 |
jonen |
1.2 |
<A NAME='methoddo_query'><!-- --></A> |
504 |
|
|
<SPAN CLASS="font12bold">do_query</SPAN> (line <span class="linenumber">98</span>) |
505 |
jonen |
1.1 |
<BR> |
506 |
jonen |
1.2 |
<SPAN CLASS="font10bold">Usage : </SPAN> |
507 |
jonen |
1.1 |
<span class="font10bold" style="color: #FF0000">void</SPAN> |
508 |
jonen |
1.2 |
<span class="font10bold" style="color: #0000FF">do_query( |
509 |
|
|
)</SPAN> |
510 |
jonen |
1.1 |
<BR> |
511 |
jonen |
1.2 |
|
512 |
|
|
<span class="font10bold" style="padding-left: 10px;">Overrides :</span> <a href="../phpHtmlLib/DataListSource.html#methoddo_query">DataListSource::do_query()</a> This is the function that does the data fetching, and sorting if needed. |
513 |
jonen |
1.1 |
<BR> |
514 |
|
|
<SPAN CLASS="font10bold">Description : </SPAN> |
515 |
|
|
This function does the query |
516 |
jonen |
1.2 |
<br /> |
517 |
|
|
<p>and search/sort</p> |
518 |
jonen |
1.1 |
<DL> |
519 |
|
|
|
520 |
jonen |
1.2 |
<DT class="font10bold">Function Info:</DT> |
521 |
|
|
</DL> |
522 |
jonen |
1.1 |
</DIV> |
523 |
|
|
<BR> |
524 |
|
|
<DIV CLASS="function"> |
525 |
jonen |
1.2 |
<A NAME='methodget_next_data_row'><!-- --></A> |
526 |
|
|
<SPAN CLASS="font12bold">get_next_data_row</SPAN> (line <span class="linenumber">116</span>) |
527 |
jonen |
1.1 |
<BR> |
528 |
jonen |
1.2 |
<SPAN CLASS="font10bold">Usage : </SPAN> |
529 |
jonen |
1.1 |
<span class="font10bold" style="color: #FF0000">void</SPAN> |
530 |
jonen |
1.2 |
<span class="font10bold" style="color: #0000FF">get_next_data_row( |
531 |
|
|
)</SPAN> |
532 |
jonen |
1.1 |
<BR> |
533 |
jonen |
1.2 |
|
534 |
|
|
<span class="font10bold" style="padding-left: 10px;">Overrides :</span> <a href="../phpHtmlLib/DataListSource.html#methodget_next_data_row">DataListSource::get_next_data_row()</a> This function gets the next data row from the query() |
535 |
jonen |
1.1 |
<BR> |
536 |
|
|
<SPAN CLASS="font10bold">Description : </SPAN> |
537 |
jonen |
1.2 |
This function returns the next row of valid data. |
538 |
|
|
<br /> |
539 |
jonen |
1.1 |
|
540 |
|
|
<DL> |
541 |
|
|
|
542 |
jonen |
1.2 |
<DT class="font10bold">Function Info:</DT> |
543 |
|
|
</DL> |
544 |
jonen |
1.1 |
</DIV> |
545 |
|
|
<BR> |
546 |
|
|
<DIV CLASS="function"> |
547 |
jonen |
1.2 |
<A NAME='methodsort'><!-- --></A> |
548 |
|
|
<SPAN CLASS="font12bold">sort</SPAN> (line <span class="linenumber">205</span>) |
549 |
jonen |
1.1 |
<BR> |
550 |
jonen |
1.2 |
<SPAN CLASS="font10bold">Usage : </SPAN> |
551 |
jonen |
1.1 |
<span class="font10bold" style="color: #FF0000">void</SPAN> |
552 |
jonen |
1.2 |
<span class="font10bold" style="color: #0000FF">sort( |
553 |
|
|
)</SPAN> |
554 |
jonen |
1.1 |
<BR> |
555 |
jonen |
1.2 |
|
556 |
|
|
<span class="font10bold" style="padding-left: 10px;">Overrides :</span> <a href="../phpHtmlLib/DataListSource.html#methodsort">DataListSource::sort()</a> 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. |
557 |
jonen |
1.1 |
<BR> |
558 |
|
|
<SPAN CLASS="font10bold">Description : </SPAN> |
559 |
|
|
|
560 |
jonen |
1.2 |
<br /> |
561 |
jonen |
1.1 |
|
562 |
|
|
<DL> |
563 |
|
|
|
564 |
jonen |
1.2 |
<DT class="font10bold">Function Info:</DT> |
565 |
|
|
</DL> |
566 |
jonen |
1.1 |
</DIV> |
567 |
|
|
<BR> |
568 |
|
|
<DIV CLASS="function"> |
569 |
jonen |
1.2 |
<A NAME='method_construct_row'><!-- --></A> |
570 |
|
|
<SPAN CLASS="font12bold">_construct_row</SPAN> (line <span class="linenumber">163</span>) |
571 |
jonen |
1.1 |
<BR> |
572 |
jonen |
1.2 |
<SPAN CLASS="font10bold">Usage : </SPAN> |
573 |
jonen |
1.1 |
<span class="font10bold" style="color: #FF0000">array</SPAN> |
574 |
jonen |
1.2 |
<span class="font10bold" style="color: #0000FF">_construct_row( |
575 |
|
|
string |
576 |
|
|
$line)</SPAN> |
577 |
jonen |
1.1 |
<BR> |
578 |
|
|
|
579 |
|
|
<BR> |
580 |
|
|
<SPAN CLASS="font10bold">Description : </SPAN> |
581 |
jonen |
1.2 |
this is used to build a row from a csv line |
582 |
|
|
<br /> |
583 |
jonen |
1.1 |
|
584 |
|
|
<DL> |
585 |
jonen |
1.2 |
<DT class="font10bold">Function Parameters:</DT> |
586 |
|
|
<DD CLASS="font10" STYLE="padding-bottom:5px;"><span STYLE="font-style: italic;">- <span style="color: #FF0000;font-weight:bold;">string</SPAN> <span style="color: #0000FF;font-weight:bold">$line</SPAN></SPAN> - the original csv line from the file</DD> |
587 |
|
|
|
588 |
|
|
<DT class="font10bold">Function Info:</DT> |
589 |
|
|
</DL> |
590 |
jonen |
1.1 |
</DIV> |
591 |
|
|
<BR> |
592 |
|
|
<DIV CLASS="function"> |
593 |
jonen |
1.2 |
<A NAME='method_find_data'><!-- --></A> |
594 |
|
|
<SPAN CLASS="font12bold">_find_data</SPAN> (line <span class="linenumber">224</span>) |
595 |
jonen |
1.1 |
<BR> |
596 |
jonen |
1.2 |
<SPAN CLASS="font10bold">Usage : </SPAN> |
597 |
jonen |
1.1 |
<span class="font10bold" style="color: #FF0000">void</SPAN> |
598 |
jonen |
1.2 |
<span class="font10bold" style="color: #0000FF">_find_data( |
599 |
|
|
mixed |
600 |
|
|
$row_data)</SPAN> |
601 |
jonen |
1.1 |
<BR> |
602 |
|
|
|
603 |
|
|
<BR> |
604 |
|
|
<SPAN CLASS="font10bold">Description : </SPAN> |
605 |
|
|
|
606 |
jonen |
1.2 |
<br /> |
607 |
jonen |
1.1 |
|
608 |
|
|
<DL> |
609 |
|
|
|
610 |
jonen |
1.2 |
<DT class="font10bold">Function Info:</DT> |
611 |
|
|
</DL> |
612 |
jonen |
1.1 |
</DIV> |
613 |
|
|
<BR> |
614 |
|
|
<DIV CLASS="function"> |
615 |
jonen |
1.2 |
<A NAME='method_get_header'><!-- --></A> |
616 |
|
|
<SPAN CLASS="font12bold">_get_header</SPAN> (line <span class="linenumber">143</span>) |
617 |
jonen |
1.1 |
<BR> |
618 |
jonen |
1.2 |
<SPAN CLASS="font10bold">Usage : </SPAN> |
619 |
jonen |
1.1 |
<span class="font10bold" style="color: #FF0000">void</SPAN> |
620 |
jonen |
1.2 |
<span class="font10bold" style="color: #0000FF">_get_header( |
621 |
|
|
)</SPAN> |
622 |
jonen |
1.1 |
<BR> |
623 |
|
|
|
624 |
|
|
<BR> |
625 |
|
|
<SPAN CLASS="font10bold">Description : </SPAN> |
626 |
|
|
This file trys to get the CSV header. |
627 |
jonen |
1.2 |
<br /> |
628 |
jonen |
1.1 |
|
629 |
|
|
<DL> |
630 |
|
|
|
631 |
jonen |
1.2 |
<DT class="font10bold">Function Info:</DT> |
632 |
|
|
</DL> |
633 |
jonen |
1.1 |
</DIV> |
634 |
|
|
<BR> |
635 |
jonen |
1.2 |
<div id="credit"> |
636 |
|
|
<hr> |
637 |
|
|
Documention generated on Thu, 20 Feb 2003 16:22:33 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.0rc1</a> |
638 |
|
|
</div> |
639 |
|
|
</body> |
640 |
|
|
</html> |