code example of using Yii to manage complex business logic of Certifications