interception of data that we get from the database

The problem is quite original, I will not go into details.

I need to pass through the method of any value that comes from the database to format them to clean up, etc. does not matter.

Actually, how? Thank you.

for example if you had a model called Event… in the model you’d create an afterFind function…

public function afterFind()



        //would take the date from the db and format it for yii to use


        return true;


yes, its good idea, thank you :) but i want something on CDbCommand level… for intercepting direct queries.