0 follower

Yii Framework 1.0 API Documentation

This is the Yii Framework API Documentation. Here you will find detailed information about all classes provided by the Framework. Below you find a list of the existing classes, interfaces, and traits, ordered by their fully qualified name (including the namespace). Each of them has a dedicated page which contains a description about the purpose of the class, a list of the available methods, properties and constants, and detailed description on how to use each of them.

On this page you find all the classes included in version 1.0 of the framework. You can use the dropdown menu on the top right to switch between versions.

You can search API documentation using the search form on the top. You can search for class names and also method and property names, e.g. ActiveRecord.save() or just .save() or ::save().

PackageClassDescription
system Yii Yii is a helper class serving common framework functionalities.
YiiBase YiiBase is a helper class serving common framework functionalities.
system.base CApplication CApplication is the base class for all application classes.
CApplicationComponent CApplicationComponent is the base class for application component classes.
CBehavior CBehavior is a convenient base class for behavior classes.
CComponent CComponent is the base class for all components.
CEnumerable CEnumerable is the base class for all enumerable types.
CErrorEvent CErrorEvent represents the parameter for the onError event.
CErrorHandler CErrorHandler handles uncaught PHP errors and exceptions.
CEvent CEvent is the base class for all event classes.
CException CException represents a generic exception for all purposes.
CExceptionEvent CExceptionEvent represents the parameter for the onException event.
CHttpException CHttpException represents an exception caused by invalid operations of end-users.
CModel CModel is the base class providing the common features needed by data model objects.
CModelBehavior CModelBehavior is a base class for behaviors that are attached to a model component.
CModelEvent CModelEvent class.
CModule CModule is the base class for module and application classes.
CSecurityManager CSecurityManager provides private keys, hashing and encryption functions.
CStatePersister CStatePersister implements a file-based persistent data storage.
IAction IAction is the interface that must be implemented by controller actions.
IApplicationComponent IApplicationComponent is the interface that all application components must implement.
IAuthManager IAuthManager interface is implemented by an auth manager application component.
IBehavior IBehavior interfaces is implemented by all behavior classes.
IFilter IFilter is the interface that must be implemented by action filters.
IStatePersister IStatePersister is the interface that must be implemented by state persister calsses.
IUserIdentity IUserIdentity interface is implemented by a user identity class.
IViewRenderer IViewRenderer interface is implemented by a view renderer class.
IWebServiceProvider IWebServiceProvider interface may be implemented by Web service provider classes.
IWebUser IWebUser interface is implemented by a user application component.
system.caching CApcCache CApcCache provides APC caching in terms of an application component.
CCache CCache is the base class for cache classes with different cache storage implementation.
CDbCache CDbCache implements a cache application component by storing cached data in a database.
CDummyCache CDummyCache is a placeholder cache component.
CEAcceleratorCache CEAcceleratorCache implements a cache application module based on eaccelerator.
CFileCache CFileCache provides a file-based caching mechanism.
CMemCache CMemCache implements a cache application component based on memcached.
CMemCacheServerConfiguration CMemCacheServerConfiguration represents the configuration data for a single memcache server.
CXCache CXCache implements a cache application module based on xcache.
CZendDataCache CZendDataCache implements a cache application module based on the Zend Data Cache
ICache ICache is the interface that must be implemented by cache components.
ICacheDependency ICacheDependency is the interface that must be implemented by cache dependency classes.
system.caching.dependencies CCacheDependency CCacheDependency is the base class for cache dependency classes.
CChainedCacheDependency CChainedCacheDependency represents a list of cache dependencies.
CDbCacheDependency CDbCacheDependency represents a dependency based on the query result of a SQL statement.
CDirectoryCacheDependency CDirectoryCacheDependency represents a dependency based on change of a directory.
CExpressionDependency CExpressionDependency represents a dependency based on the result of a PHP expression.
CFileCacheDependency CFileCacheDependency represents a dependency based on a file's last modification time.
CGlobalStateCacheDependency CGlobalStateCacheDependency represents a dependency based on a global state value.
system.collections CAttributeCollection CAttributeCollection implements a collection for storing attribute names and values.
CConfiguration CConfiguration represents an array-based configuration.
CList CList implements an integer-indexed collection class.
CListIterator CListIterator implements an interator for CList.
CMap CMap implements a collection that takes key-value pairs.
CMapIterator CMapIterator implements an interator for CMap.
CQueue CQueue implements a queue.
CQueueIterator CQueueIterator implements an interator for CQueue.
CStack CStack implements a stack.
CStackIterator CStackIterator implements an interator for CStack.
CTypedList CTypedList represents a list whose items are of the certain type.
system.console CConsoleApplication CConsoleApplication represents a console application.
CConsoleCommand CConsoleCommand represents an executable user command.
CConsoleCommandRunner CConsoleCommandRunner manages commands and executes the requested command.
CHelpCommand CHelpCommand represents a console help command.
system.db CDbCommand CDbCommand represents an SQL statement to execute against a database.
CDbConnection CDbConnection represents a connection to a database.
CDbDataReader CDbDataReader represents a forward-only stream of rows from a query result set.
CDbException CDbException represents an exception that is caused by some DB-related operations.
CDbTransaction CDbTransaction represents a DB transaction.
system.db.ar CActiveFinder CActiveFinder implements eager loading and lazy loading of related active records.
CActiveRecord CActiveRecord is the base class for classes representing relational data.
CActiveRecordBehavior CActiveRecordBehavior is the base class for behaviors that can be attached to CActiveRecord.
CActiveRecordMetaData CActiveRecordMetaData represents the meta-data for an Active Record class.
CActiveRelation CActiveRelation is the base class for representing active relations that bring back related objects.
CBaseActiveRelation CBaseActiveRelation is the base class for all active relations.
CBelongsToRelation CBelongsToRelation represents the parameters specifying a BELONGS_TO relation.
CHasManyRelation CHasManyRelation represents the parameters specifying a HAS_MANY relation.
CHasOneRelation CHasOneRelation represents the parameters specifying a HAS_ONE relation.
CJoinElement CJoinElement represents a tree node in the join tree created by CActiveFinder.
CJoinQuery CJoinQuery represents a JOIN SQL statement.
CManyManyRelation CManyManyRelation represents the parameters specifying a MANY_MANY relation.
CStatElement CStatElement represents STAT join element for CActiveFinder.
CStatRelation CStatRelation represents a statistical relational query.
system.db.schema CDbColumnSchema CDbColumnSchema class describes the column meta data of a database table.
CDbCommandBuilder CDbCommandBuilder provides basic methods to create query commands for tables.
CDbCriteria CDbCriteria represents a query criteria, such as conditions, ordering by, limit/offset.
CDbExpression CDbExpression represents a DB expression that does not need escaping.
CDbSchema CDbSchema is the base class for retrieving metadata information.
CDbTableSchema CDbTableSchema is the base class for representing the metadata of a database table.
system.db.schema.mssql CMssqlColumnSchema CMssqlColumnSchema class describes the column meta data of a MSSQL table.
CMssqlCommandBuilder CMssqlCommandBuilder provides basic methods to create query commands for tables for Mssql Servers.
CMssqlPdoAdapter This is an extension of default PDO class for mssql driver only
CMssqlSchema CMssqlSchema is the class for retrieving metadata information from a MS SQL Server database.
CMssqlTableSchema CMssqlTableSchema represents the metadata for a MSSQL table.
system.db.schema.mysql CMysqlColumnSchema CMysqlColumnSchema class describes the column meta data of a MySQL table.
CMysqlSchema CMysqlSchema is the class for retrieving metadata information from a MySQL database (version 4.1.x and 5.x).
CMysqlTableSchema CMysqlTableSchema represents the metadata for a MySQL table.
system.db.schema.oci COciColumnSchema COciColumnSchema class describes the column meta data of a Oracle table.
COciCommandBuilder COciCommandBuilder provides basic methods to create query commands for tables.
COciSchema COciSchema is the class for retrieving metadata information from an Oracle database.
COciTableSchema COciTableSchema represents the metadata for a Oracle table.
system.db.schema.pgsql CPgsqlColumnSchema CPgsqlColumnSchema class describes the column meta data of a PostgreSQL table.
CPgsqlSchema CPgsqlSchema is the class for retrieving metadata information from a PostgreSQL database.
CPgsqlTableSchema CPgsqlTable represents the metadata for a PostgreSQL table.
system.db.schema.sqlite CSqliteColumnSchema CSqliteColumnSchema class describes the column meta data of a SQLite table.
CSqliteCommandBuilder CSqliteCommandBuilder provides basic methods to create query commands for SQLite tables.
CSqliteSchema CSqliteSchema is the class for retrieving metadata information from a SQLite (2/3) database.
system.i18n CDateFormatter CDateFormatter provides date/time localization functionalities.
CDbMessageSource CDbMessageSource represents a message source that stores translated messages in database.
CGettextMessageSource CGettextMessageSource represents a message source that is based on GNU Gettext.
CLocale CLocale represents the data relevant to a locale.
CMessageSource CMessageSource is the base class for message translation repository classes.
CMissingTranslationEvent CMissingTranslationEvent represents the parameter for the onMissingTranslation event.
CNumberFormatter CNumberFormatter provides number localization functionalities.
CPhpMessageSource CPhpMessageSource represents a message source that stores translated messages in PHP scripts.
system.i18n.gettext CGettextFile CGettextFile is the base class for representing a Gettext message file.
CGettextMoFile CGettextMoFile represents an MO Gettext message file.
CGettextPoFile CGettextPoFile represents a PO Gettext message file.
system.logging CDbLogRoute CDbLogRoute stores log messages in a database table.
CEmailLogRoute CEmailLogRoute sends selected log messages to email addresses.
CFileLogRoute CFileLogRoute records log messages in files.
CLogFilter CLogFilter preprocesses the logged messages before they are handled by a log route.
CLogRoute CLogRoute is the base class for all log route classes.
CLogRouter CLogRouter manages log routes that record log messages in different media.
CLogger CLogger records log messages in memory.
CProfileLogRoute CProfileLogRoute displays the profiling results in Web page.
CWebLogRoute CWebLogRoute shows the log content in Web page.
system.utils CChoiceFormat CChoiceFormat is a helper that chooses an appropriate message based on the specified number value.
CDateTimeParser CDateTimeParser converts a date/time string to a UNIX timestamp according to the specified pattern.
CFileHelper CFileHelper provides a set of helper methods for common file system operations.
CMarkdownParser CMarkdownParser is a wrapper of MarkdownExtra_Parser.
CPropertyValue CPropertyValue is a helper class that provides static methods to convert component property values to specific types.
CTimestamp CTimestamp represents a timestamp.
CVarDumper CVarDumper is intended to replace the buggy PHP function var_dump and print_r.
system.validators CBooleanValidator CBooleanValidator validates that the attribute value is either trueValue or falseValue.
CCaptchaValidator CCaptchaValidator validates that the attribute value is the same as the verification code displayed in the CAPTCHA.
CCompareValidator CCompareValidator compares the specified attribute value with another value and validates if they are equal.
CDefaultValueValidator CDefaultValueValidator sets the attributes with the specified value.
CEmailValidator CEmailValidator validates that the attribute value is a valid email address.
CExistValidator CExistValidator validates that the attribute value exists in a table.
CFileValidator CFileValidator verifies if an attribute is receiving a valid uploaded file.
CFilterValidator CFilterValidator transforms the data being validated based on a filter.
CInlineValidator CInlineValidator represents a validator which is defined as a method in the object being validated.
CNumberValidator CNumberValidator validates that the attribute value is a number.
CRangeValidator CRangeValidator validates that the attribute value is among the list (specified via range).
CRegularExpressionValidator CRegularExpressionValidator validates that the attribute value matches to the specified regular expression.
CRequiredValidator CRequiredValidator validates that the specified attribute does not have null or empty value.
CStringValidator CStringValidator validates that the attribute value is of certain length.
CTypeValidator CTypeValidator verifies if the attribute is of the type specified by type.
CUniqueValidator CUniqueValidator validates that the attribute value is unique in the corresponding database table.
CUrlValidator CUrlValidator validates that the attribute value is a valid http or https URL.
CValidator CValidator is the base class for all validators.
system.web CAssetManager CAssetManager is a Web application component that manages private files (called assets) and makes them accessible by Web clients.
CBaseController CBaseController is the base class for CController and CWidget.
CCacheHttpSession CCacheHttpSession implements a session component using cache as storage medium.
CClientScript CClientScript manages JavaScript and CSS stylesheets for views.
CController CController manages a set of actions which deal with the corresponding user requests.
CCookieCollection CCookieCollection implements a collection class to store cookies.
CDbHttpSession CDbHttpSession extends CHttpSession by using database as session data storage.
CExtController CExtController is the base class for controllers distributed as extension.
CFormModel CFormModel represents a data model that collects HTML form inputs.
CHttpCookie A CHttpCookie instance stores a single cookie, including the cookie name, value, domain, path, expire, and secure.
CHttpRequest CHttpRequest encapsulates the $_SERVER variable and resolves its inconsistency among different Web servers.
CHttpSession CHttpSession provides session-level data management and the related configurations.
CHttpSessionIterator CHttpSessionIterator implements an interator for CHttpSession.
COutputEvent COutputEvent represents the parameter for events related with output handling.
CPagination CPagination represents information relevant to pagination.
CSort CSort represents information relevant to sorting.
CTheme CTheme represents an application theme.
CThemeManager CThemeManager manages the themes for the Web application.
CUploadedFile CUploadedFile represents the information for an uploaded file.
CUrlManager CUrlManager manages the URLs of Yii Web applications.
CUrlRule CUrlRule represents a URL formatting/parsing rule.
CWebApplication CWebApplication extends CApplication by providing functionalities specific to Web requests.
CWebModule CWebModule represents an application module.
system.web.actions CAction CAction is the base class for all controller action classes.
CInlineAction CInlineAction represents an action that is defined as a controller method.
CViewAction CViewAction represents an action that displays a view according to a user-specified parameter.
system.web.auth CAccessControlFilter CAccessControlFilter performs authorization checks for the specified actions.
CAccessRule CAccessRule represents an access rule that is managed by CAccessControlFilter.
CAuthAssignment CAuthAssignment represents an assignment of a role to a user.
CAuthItem CAuthItem represents an authorization item.
CAuthManager CAuthManager is the base class for authorization manager classes.
CBaseUserIdentity CBaseUserIdentity is a base class implementing IUserIdentity.
CDbAuthManager CDbAuthManager represents an authorization manager that stores authorization information in database.
CPhpAuthManager CPhpAuthManager represents an authorization manager that stores authorization information in terms of a PHP script file.
CUserIdentity CUserIdentity is a base class for representing identities that are authenticated based on a username and a password.
CWebUser CWebUser represents the persistent state for a Web application user.
system.web.filters CFilter CFilter is the base class for all filters.
CFilterChain CFilterChain represents a list of filters being applied to an action.
CInlineFilter CInlineFilter represents a filter defined as a controller method.
system.web.helpers CGoogleApi CGoogleApi provides helper methods to easily access Google AJAX APIs.
CHtml CHtml is a static class that provides a collection of helper methods for creating HTML views.
CJSON CJSON converts PHP data to and from JSON format.
CJavaScript CJavaScript is a helper class containing JavaScript-related handling functions.
system.web.renderers CPradoViewRenderer CPradoViewRenderer implements a view renderer that allows users to use a template syntax similar to PRADO templates.
CViewRenderer CViewRenderer is the base class for view renderer classes.
system.web.services CSoapObjectWrapper CSoapObjectWrapper is a wrapper class internally used when SoapServer::setObject() is not defined.
CWebService CWebService encapsulates SoapServer and provides a WSDL-based web service.
CWebServiceAction CWebServiceAction implements an action that provides Web services.
CWsdlGenerator CWsdlGenerator generates the WSDL for a given service class.
system.web.widgets CAutoComplete CAutoComplete generates an auto-complete text field.
CClipWidget CClipWidget records its content and makes it available elsewhere.
CContentDecorator CContentDecorator decorates the content it encloses with the specified view.
CFilterWidget CFilterWidget is the base class for widgets that can also be used as filters.
CFlexWidget CFlexWidget embeds a Flex 3.x application into a page.
CHtmlPurifier CHtmlPurifier is wrapper of HTML Purifier.
CInputWidget CInputWidget is the base class for widgets that collect user inputs.
CMarkdown CMarkdown converts the captured content from markdown syntax to HTML code.
CMaskedTextField CMaskedTextField generates a masked text field.
CMultiFileUpload CMultiFileUpload generates a file input that can allow uploading multiple files at a time.
COutputCache COutputCache enables caching the output generated by an action or a view fragment.
COutputProcessor COutputProcessor transforms the content into a different format.
CStarRating CStarRating displays a star rating control that can collect user rating input.
CTabView CTabView displays contents in multiple tabs.
CTextHighlighter CTextHighlighter does syntax highlighting for its body content.
CTreeView CTreeView displays a tree view of hierarchical data.
CWidget CWidget is the base class for widgets.
system.web.widgets.captcha CCaptcha CCaptcha renders a CAPTCHA image element.
CCaptchaAction CCaptchaAction renders a CAPTCHA image.
system.web.widgets.pagers CBasePager CBasePager is the base class for all pagers.
CLinkPager CLinkPager displays a list of hyperlinks that lead to different pages of target.
CListPager CListPager displays a dropdown list that contains options leading to different pages of target.