34k+
News
Guide
API
Wiki
Forum
Community
Places
Members
Hall of Fame
Badges
More
Learn
Books
Resources
Develop
Download Yii
Extensions
Report an Issue
Report a Security Issue
Contribute to Yii
Donate
About
Release Cycle
License
Team
Official Logos and Design
Login
Use shortcut functions to reduce typing
Comparing
#4
with
#5
Revision #5 was created by
jonah
on Aug 22, 2009, 7:28:31 PM.
optimized bu()
« Previous (#4)
Next (#6) »
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()->getClientScript();
}
[...]
static $baseUrl;
if ($baseUrl===null)
$baseUrl=Yii::app()->
r
getR
equest
->b
()->getB
aseUrl
()
;
return $url===null ? $baseUrl : $baseUrl.'/'.ltrim($url,'/');
}
/**
* Returns the named application parameter.
[...]