Vous êtes sur la page 1sur 1

Yii API 1.0.

8
http://www.yiiframework.com

Yii (extends YiiBase) CHttpRequest CHtml


Properties CHtml is a static class that provides a collection of helper methods for
Static Methods baseUrl, browser, cookies, hostInfo, isAjaxRequest, creating HTML views. View API for more information and optional
app() /*gets the application instance */ method parameters)
isPostRequest, isSecureConnection, pathInfo,
t($category, $message, $params=array ( ),
$source=NULL, $language=NULL);
preferredLanguage, queryString, requestUri, Static Methods
serverName, serverPort, url, urlReferrer, userAgent, For CActiveRecords: For CForm
import(string $alias, boolean $forceInclude=false);
userHost, userHostAddress activeCheckbox($m, $a); checkbox($n, $v);
log($msg, $level='info', $category='application');
Methods activeCheckboxList($m, $a, $data); checkboxList($n, $v, $data);
sendFile($fn, $c, $mime=NULL, $t=true); activeDropDownList($m, $a, $data); dropDownList($n, $c, $data);
CWebApplication (extends CApplication) activeFileField($m, $a); fileField($n, $v);
Core application components activeHiddenField($m, $a); hiddenField($n, $v);
errorHandler, securityManager, statePersister,
CActiveRecord activeId($m, $a); label($n, $v);
cache, messages, coreMessages Properties activeLabel($m, $a); listBox($n, $v, $data);
attributes, errors, isNewRecord, primaryKey, scenario activeLabelEx($m, $a); passwordField($n, $v);
Properties activeListBox($m, $a, $data); radioButton($n, $c);
cache, charset, components, db, language, locale, Static Methods activePasswordField($m, $a); radioButtonList($n, $m, $data);
name, modules, securityManager, sourceLanguage model($className='CActiveRecord');
activeRadioButton($m, $a); textArea($n, $v);
Methods Public Methods Events activeRadioButtonList($m, $a, $data); textField($n, $v);
getNumberFormatter(); getDateFormatter(); count($c=’’, $p=array ( )); onAfterDelete($e); activeTextArea($m, $a);
delete(); onAfterInsert($e); activeTextField($m, $a);
deleteAll($c='', $p=array ( )); onAfterSave($e);
CWidget (extends CBaseController) find($c='', $p=array ( )); onAfterValidate($e); CFormModel
Properties findAll($c='', $p=array ( )); onBeforeDelete($e); Properties
controller, id, owner, viewPath findBySql($sql, $p=array ( )); onBeforeSave($e); attributes, errors, safeAttributeNames, scenario, validators
Methods hasErrors($a); onBeforeValidate($e);
init(); run(); render($view, $data=NULL, $return=false); update($a=NULL); Public Methods Events
addError($a, $error); onAfterValidate($e);
updateAll($a, $c='', $p=array ( ));
afterValidate($scenario); onBeforeValidate($e);
updateByPk($pk, $a, $c='', $p=array ( ));
attributeLabels();
CController (extends CBaseController) validate();
beforeValidate($scenario);
Properties hasErrors($a);
action, defaultAction, id, layout, module, pageTitle rules();
CDbCommand validate($s='', $a=NULL);
Methods
Properties
actions(); /*list of external actions*/
connection, text
CDbConnection
beginClip($id, $properties=array ( ));
endClip($idclip=’’); Properties
beginWidget($className, $properties=array ( ));
Public Methods active, autoCommit, autoConnect, charset, commandBuilder,
bindParam($n, $v, $dt=NULL, $length=NULL); connectionStatus, connectionString, currentTransaction, lastInsertId,
endWidget(string $id='');
bindValue($n, $v, $dataType=NULL); password, schema, schemaCachingDuration, timeout, username
missingAction(string $actionID);
redirect($url, $terminate=true, $statusCode=302); execute(); Public Methods
refresh($terminate=true,$anchor=''); query(); beginTransaction(); quoteColumnName($name);
render($view, $data=NULL, $return=false); queryAll($fetchAssociative=true); createCommand($sql); quoteTableName($name);
renderPartial($v, $d=NULL,$r=false, queryColumn(); open(); quoteValue($name);
$processOutput=false); queryRow($fetchAssociative=true); close();
widget( $className, $properties=array ( )); queryScalar(); init();