Use Yii methods in example controller

@alexandernst  could we display a json? I found it better to read