Use shortcut functions to reduce typing

Comparing #3 with #8

Content

[...]
/**
* This is the shortcut to Yii::app()->clientScript
*/
function cs()
{
// You could also call the client script instance via Yii::app()->clientScript
 
// But this is faster
 
return Yii::app()->cgetClientScript();
 
}
 
 
/**
 
 * This is the shortcut to Yii::app()->user.
 
 */
 
function user() 
 
{
 
return Yii::app()->getUser()
;
}
[...]
static $baseUrl;
if ($baseUrl===null)
$baseUrl=Yii::app()->
rgetRequest->b()->getBaseUrl();
return $url===null ? $baseUrl : $baseUrl.'/'.ltrim($url,'/');
}
[...]
return Yii::app()->params[$name];
}

 
/**
 
 * This is the shortcut to Yii::app()->user.
 
 */
 
function user() 
 
{
 
return Yii::app()->user;
 
}
 
```
 
```
 
 
### Links
 
 
- [Russian Version](http://dbhelp.ru/global-yii-functions/page/)