yii short cut functions and random string generator.