Phactory integration for the Yii framework