Yii 1.1 extension for json encoding CActiveRecord and their relations