card management with yii framework