system system.base system.caching system.caching.dependencies system.collections system.console system.db system.db.ar system.db.schema system.db.schema.mssql system.db.schema.mysql system.db.schema.oci system.db.schema.pgsql system.db.schema.sqlite system.i18n system.i18n.gettext system.logging system.utils system.validators system.web system.web.actions system.web.auth system.web.filters system.web.helpers system.web.renderers system.web.services system.web.widgets system.web.widgets.captcha system.web.widgets.pagers

CGoogleApi

system.web.helpers
继承 class CGoogleApi
可用自 1.0.3
版本 $Id$
CGoogleApi provides helper methods to easily access Google AJAX APIs.

公共方法

隐藏继承的方法

方法描述被定义在
init() Renders the jsapi script file. CGoogleApi
load() Loads the specified API module. CGoogleApi
register() Registers the specified API module. CGoogleApi

方法详情

init() 方法
public static string init(string $apiKey=NULL)
$apiKey string the API key. Null if you do not have a key.
{return} string the script tag that loads Google jsapi.

Renders the jsapi script file.

load() 方法
public static string load(string $name, string $version='1', array $options=array ( ))
$name string the module name
$version string the module version
$options array additional js options that are to be passed to the load() function.
{return} string the js code for loading the module. You can use CHtml::script() to enclose it in a script tag.

Loads the specified API module. Note that you should call init first.

register() 方法
public static void register(string $name, string $version='1', array $options=array ( ), string $apiKey=NULL)
$name string the module name
$version string the module version
$options array additional js options that are to be passed to the load() function.
$apiKey string the API key. Null if you do not have a key.

Registers the specified API module. This is similar to load except that it registers the loading code with CClientScript instead of returning it. This method also registers the jsapi script needed by the loading call.