public function filter(callable $cb) { if (!$this->_rows) { $this->readRows(); } $collection = new static(); $collection->setRecords(array_filter($this->_rows, $cb)); return $collection; }