public function __construct(\Iterator $records, RecordCollection $previousCollection, callable $filter) { parent::__construct($records, $previousCollection); $this->filter = $filter; }
function getCollection($criteria = null) { if (isset($this->_collection) && $this->_collection) { if (!isset($criteria)) { return $this->_collection; } $collection =& $this->_collection; } else { $collection = new RecordCollection($this->dbcon); $collection->setSource($this->datatable); } if (isset($criteria)) { $collection->setCriteria($criteria); } foreach ($this->_search_criteria_global as $crit_phrase) { $collection->addCriteria($crit_phrase); } if (!$this->_allow_db_cache) { $collection->clearCache(); } $this->_collection =& $collection; return $this->_collection; }