Filter ActiveRecord rows

Hi all,

I want a public function in a CActiveRecord that does a findAll with a set of criteria. It then processes these rows and only returns the ones that meet the processing rules.

I guess I am asking if you do something like this:

$rows = Stub::Model()->findAll();

Process $rows in foreach loop;

Delete from $rows (NOT from the database) any row not meeting the rules.

return filtered $rows to calling function.


what is your problem?