based on yii framework