21 |
* $Id$ |
* $Id$ |
22 |
* |
* |
23 |
* $Log$ |
* $Log$ |
24 |
|
* Revision 1.3 2003/04/18 13:48:27 joko |
25 |
|
* minor updates to comments |
26 |
|
* |
27 |
|
* Revision 1.2 2003/03/28 02:59:07 joko |
28 |
|
* minor fix: prevent php-error if result is empty |
29 |
|
* |
30 |
* Revision 1.1 2003/03/27 01:10:57 jonen |
* Revision 1.1 2003/03/27 01:10:57 jonen |
31 |
* + moved from com.newsblob.phphtmllib tree(was MemoryDataListSource.inc) |
* + moved from com.newsblob.phphtmllib tree(was MemoryDataListSource.inc) |
32 |
* |
* |
101 |
class MemoryDataSource extends DataListSource { |
class MemoryDataSource extends DataListSource { |
102 |
|
|
103 |
// it's free now! |
// it's free now! |
104 |
//class DataSource_Proxy_Memory { |
//class MemoryDataSource { |
105 |
|
|
106 |
|
// not yet! ;-) |
107 |
|
|
108 |
|
|
109 |
/** |
/** |
210 |
$this->propagate_result(); |
$this->propagate_result(); |
211 |
} |
} |
212 |
|
|
213 |
function propagate_result() { |
function propagate_result() { |
214 |
$this->debug('propagate_result', "PROPAGATE RESULT!"); |
$this->debug('propagate_result', "PROPAGATE RESULT!"); |
215 |
foreach ($this->_result as $value) { |
|
216 |
|
$count = 0; |
217 |
|
if (is_array($this->_result)) { |
218 |
|
foreach ($this->_result as $value) { |
219 |
$this->trace_payload("propagate_result", $value); |
$this->trace_payload("propagate_result", $value); |
220 |
if ($this->add_data_row( $value)) { |
if ($this->add_data_row($value)) { |
221 |
$count++; |
$count++; |
222 |
} |
} |
223 |
} |
} |
224 |
$this->set_total_rows( $count ); |
} |
225 |
$this->sort(); |
|
226 |
|
$this->set_total_rows( $count ); |
227 |
|
$this->sort(); |
228 |
|
|
229 |
} |
} |
230 |
|
|
231 |
/** |
/** |
279 |
return; |
return; |
280 |
} |
} |
281 |
*/ |
*/ |
282 |
|
|
283 |
|
if (!is_array($this->_schema[labels] )) { |
284 |
|
logp(get_class($this) . "->propagate_schema: No schema data could be read from result.", PEAR_LOG_WARNING); |
285 |
|
return; |
286 |
|
} |
287 |
|
|
288 |
foreach($this->_schema[labels] as $value) { |
foreach($this->_schema[labels] as $value) { |
289 |
$this->debug("propagate_schema", "label: $value"); |
$this->debug("propagate_schema", "label: $value"); |
290 |
array_push($this->_data_keys, $value); |
array_push($this->_data_keys, $value); |