From 646cbb2b9a7a5e55733fbb115c7a520df3c0ed46 Mon Sep 17 00:00:00 2001 From: "alexander.makarow" Date: Tue, 25 Oct 2011 00:01:09 +0000 Subject: [PATCH] Documented component accessors with @property for significantly better IDE autocomplete --- framework/base/CApplication.php | 48 ++++++++------- framework/base/CApplicationComponent.php | 2 + framework/base/CModule.php | 27 ++++++--- framework/base/CSecurityManager.php | 6 ++ framework/caching/CDbCache.php | 4 ++ framework/caching/CFileCache.php | 3 + framework/caching/CMemCache.php | 3 + .../caching/dependencies/CCacheDependency.php | 4 ++ .../dependencies/CChainedCacheDependency.php | 3 + framework/cli/commands/ShellCommand.php | 2 + framework/cli/commands/shell/HelpCommand.php | 2 + framework/console/CConsoleApplication.php | 3 + framework/console/CConsoleCommand.php | 6 ++ framework/console/CConsoleCommandRunner.php | 2 + framework/console/CHelpCommand.php | 2 + framework/db/CDbCommand.php | 19 ++++++ framework/db/CDbConnection.php | 21 +++++++ framework/db/CDbDataReader.php | 5 ++ framework/db/CDbMigration.php | 2 + framework/db/CDbTransaction.php | 3 + framework/db/schema/CDbCommandBuilder.php | 3 + framework/db/schema/CDbSchema.php | 7 +++ framework/db/schema/CDbTableSchema.php | 2 + framework/db/schema/oci/COciSchema.php | 2 + framework/gii/CCodeFile.php | 3 + framework/gii/CCodeGenerator.php | 3 + framework/gii/CCodeModel.php | 4 ++ framework/gii/GiiModule.php | 2 + framework/i18n/CDbMessageSource.php | 2 + framework/i18n/CLocale.php | 17 ++++++ framework/i18n/CMessageSource.php | 3 + framework/logging/CEmailLogRoute.php | 5 ++ framework/logging/CFileLogRoute.php | 5 ++ framework/logging/CLogRouter.php | 2 + framework/logging/CLogger.php | 11 ++++ framework/logging/CProfileLogRoute.php | 2 + framework/test/CDbFixtureManager.php | 3 + framework/test/CDbTestCase.php | 2 + framework/test/CWebTestCase.php | 2 + framework/utils/CFormatter.php | 2 + framework/utils/CMarkdownParser.php | 2 + framework/web/CActiveDataProvider.php | 3 + framework/web/CAssetManager.php | 4 ++ framework/web/CCacheHttpSession.php | 2 + framework/web/CClientScript.php | 2 + framework/web/CController.php | 12 ++++ framework/web/CDataProvider.php | 9 +++ framework/web/CDbHttpSession.php | 2 + framework/web/CExtController.php | 2 + framework/web/CHttpRequest.php | 59 ++++++++++--------- framework/web/CHttpSession.php | 14 +++++ framework/web/CPagination.php | 10 ++++ framework/web/CSort.php | 6 ++ framework/web/CTheme.php | 7 +++ framework/web/CThemeManager.php | 4 ++ framework/web/CUploadedFile.php | 15 +++++ framework/web/CUrlManager.php | 6 ++ framework/web/CWebApplication.php | 31 +++++----- framework/web/CWebModule.php | 7 +++ framework/web/actions/CAction.php | 3 + framework/web/actions/CViewAction.php | 3 + framework/web/auth/CAccessControlFilter.php | 2 + framework/web/auth/CAuthAssignment.php | 5 ++ framework/web/auth/CAuthItem.php | 8 +++ framework/web/auth/CAuthManager.php | 4 ++ framework/web/auth/CBaseUserIdentity.php | 7 +++ framework/web/auth/CDbAuthManager.php | 2 + framework/web/auth/CPhpAuthManager.php | 2 + framework/web/auth/CUserIdentity.php | 3 + framework/web/auth/CWebUser.php | 7 +++ framework/web/form/CForm.php | 11 ++++ framework/web/form/CFormButtonElement.php | 2 + framework/web/form/CFormElement.php | 4 ++ framework/web/form/CFormInputElement.php | 4 ++ framework/web/form/CFormStringElement.php | 2 + framework/web/services/CWebService.php | 2 + framework/web/services/CWebServiceAction.php | 2 + framework/web/widgets/CFilterWidget.php | 2 + framework/web/widgets/CFlexWidget.php | 2 + framework/web/widgets/CMarkdown.php | 2 + framework/web/widgets/COutputCache.php | 2 + framework/web/widgets/CWidget.php | 5 ++ .../web/widgets/captcha/CCaptchaAction.php | 2 + framework/web/widgets/pagers/CBasePager.php | 6 ++ framework/zii/widgets/grid/CGridColumn.php | 3 + framework/zii/widgets/grid/CGridView.php | 4 ++ 86 files changed, 473 insertions(+), 74 deletions(-) diff --git a/framework/base/CApplication.php b/framework/base/CApplication.php index 17360865cc..e2e29d6a78 100644 --- a/framework/base/CApplication.php +++ b/framework/base/CApplication.php @@ -45,32 +45,36 @@ * Starting from lifecycle 3, if a PHP error or an uncaught exception occurs, * the application will switch to its error handling logic and jump to step 6 afterwards. * + * @property string $id The unique identifier for the application. + * @property string $basePath The root directory of the application. Defaults to 'protected'. + * @property string $runtimePath The directory that stores runtime files. Defaults to 'protected/runtime'. + * @property string $extensionPath The directory that contains all extensions. Defaults to the 'extensions' directory under 'protected'. + * @property string $language The language that the user is using and the application should be targeted to. + * Defaults to the {@link sourceLanguage source language}. + * @property string $timeZone The time zone used by this application. + * @property CLocale $locale The locale instance. + * @property string $localeDataPath The directory that contains the locale data. It defaults to 'framework/i18n/data'. + * @property CNumberFormatter $numberFormatter The locale-dependent number formatter. + * The current {@link getLocale application locale} will be used. + * @property CDateFormatter $dateFormatter The locale-dependent date formatter. + * The current {@link getLocale application locale} will be used. + * @property CDbConnection $db The database connection. + * @property CErrorHandler $errorHandler The error handler application component. + * @property CSecurityManager $securityManager The security manager application component. + * @property CStatePersister $statePersister The state persister application component. + * @property CCache $cache The cache application component. Null if the component is not enabled. + * @property CPhpMessageSource $coreMessages The core message translations. + * @property CMessageSource $messages The application message translations. + * @property CHttpRequest $request The request component. + * @property CUrlManager $urlManager The URL manager component. + * @property CController $controller The currently active controller. Null is returned in this base class. + * @property string $baseUrl The relative URL for the application. + * @property string $homeUrl The homepage URL. + * * @author Qiang Xue * @version $Id$ * @package system.base * @since 1.0 - * - * @property string $basePath Returns the root path of the application. - * @property CCache $cache Returns the cache component. - * @property CPhpMessageSource $coreMessages Returns the core message translations. - * @property CDateFormatter $dateFormatter Returns the locale-dependent date formatter. - * @property CDbConnection $db Returns the database connection component. - * @property CErrorHandler $errorHandler Returns the error handler component. - * @property string $extensionPath Returns the root directory that holds all third-party extensions. - * @property string $id Returns the unique identifier for the application. - * @property string $language Returns the language that the user is using and the application should be targeted to. - * @property CLocale $locale Returns the locale instance. - * @property string $localeDataPath Returns the directory that contains the locale data. - * @property CMessageSource $messages Returns the application message translations component. - * @property CNumberFormatter $numberFormatter The locale-dependent number formatter. - * @property CHttpRequest $request Returns the request component. - * @property string $runtimePath Returns the directory that stores runtime files. - * @property CSecurityManager $securityManager Returns the security manager component. - * @property CStatePersister $statePersister Returns the state persister component. - * @property string $timeZone Returns the time zone used by this application. - * @property CUrlManager $urlManager Returns the URL manager component. - * @property string $baseUrl Returns the relative URL for the application - * @property string $homeUrl the homepage URL */ abstract class CApplication extends CModule { diff --git a/framework/base/CApplicationComponent.php b/framework/base/CApplicationComponent.php index d9bc018907..67c47ecee1 100644 --- a/framework/base/CApplicationComponent.php +++ b/framework/base/CApplicationComponent.php @@ -17,6 +17,8 @@ * the {@link init()} method instead of the constructor. This has the advantage that * the application component can be customized through application configuration. * + * @property boolean $isInitialized Whether this application component has been initialized (ie, {@link init()} is invoked). + * * @author Qiang Xue * @version $Id$ * @package system.base diff --git a/framework/base/CModule.php b/framework/base/CModule.php index 5c0f3246b5..7a53d85ead 100644 --- a/framework/base/CModule.php +++ b/framework/base/CModule.php @@ -13,18 +13,29 @@ * * CModule mainly manages application components and sub-modules. * + * @property string $id The module ID. + * @property string $basePath The root directory of the module. Defaults to the directory containing the module class. + * @property CAttributeCollection $params The list of user-defined parameters. + * @property string $modulePath The directory that contains the application modules. Defaults to the 'modules' subdirectory of {@link basePath}. + * @property CModule $parentModule The parent module. Null if this module does not have a parent. + * @property array $modules The configuration of the currently installed modules (module ID => configuration). + * @property array $components The application components (indexed by their IDs). + * @property array $import List of aliases to be imported. + * @property array $aliases List of aliases to be defined. The array keys are root aliases, + * while the array values are paths or aliases corresponding to the root aliases. + * For example, + *
+ * array(
+ *    'models'=>'application.models',              // an existing alias
+ *    'extensions'=>'application.extensions',      // an existing alias
+ *    'backend'=>dirname(__FILE__).'/../backend',  // a directory
+ * )
+ * 
. + * * @author Qiang Xue * @version $Id$ * @package system.base * @since 1.0.4 - * - * @property string $basePath Returns the root directory of the module. - * @property array $components Returns the application components. - * @property string $id Returns the module ID. - * @property string $modulePath Returns the directory that contains the application modules. - * @property array $modules Returns the configuration of the currently installed modules. - * @property CAttributeCollection $params Returns user-defined parameters. - * @property CModule $parentModule Returns the parent module. */ abstract class CModule extends CComponent { diff --git a/framework/base/CSecurityManager.php b/framework/base/CSecurityManager.php index f482d2aa0a..ab71857550 100644 --- a/framework/base/CSecurityManager.php +++ b/framework/base/CSecurityManager.php @@ -33,6 +33,12 @@ * CSecurityManager is a core application component that can be accessed via * {@link CApplication::getSecurityManager()}. * + * @property string $validationKey The private key used to generate HMAC. + * If the key is not explicitly set, a random one is generated and returned. + * @property string $encryptionKey The private key used to encrypt/decrypt data. + * If the key is not explicitly set, a random one is generated and returned. + * @property string $validation + * * @author Qiang Xue * @version $Id$ * @package system.base diff --git a/framework/caching/CDbCache.php b/framework/caching/CDbCache.php index d369a8493f..17e5758c2d 100644 --- a/framework/caching/CDbCache.php +++ b/framework/caching/CDbCache.php @@ -22,6 +22,10 @@ * * See {@link CCache} manual for common cache operations that are supported by CDbCache. * + * @property integer $gCProbability The probability (parts per million) that garbage collection (GC) should be performed + * when storing a piece of data in the cache. Defaults to 100, meaning 0.01% chance. + * @property CDbConnection $dbConnection The DB connection instance. + * * @author Qiang Xue * @version $Id$ * @package system.caching diff --git a/framework/caching/CFileCache.php b/framework/caching/CFileCache.php index cc2b7653e4..939f21fffc 100644 --- a/framework/caching/CFileCache.php +++ b/framework/caching/CFileCache.php @@ -17,6 +17,9 @@ * * See {@link CCache} manual for common cache operations that are supported by CFileCache. * + * @property integer $gCProbability The probability (parts per million) that garbage collection (GC) should be performed + * when storing a piece of data in the cache. Defaults to 100, meaning 0.01% chance. + * * @author Qiang Xue * @version $Id$ * @package system.caching diff --git a/framework/caching/CMemCache.php b/framework/caching/CMemCache.php index a582be9756..8653e12365 100644 --- a/framework/caching/CMemCache.php +++ b/framework/caching/CMemCache.php @@ -51,6 +51,9 @@ * Since version 1.0.6, CMemCache can also be used with {@link http://pecl.php.net/package/memcached memcached}. * To do so, set {@link useMemcached} to be true. * + * @property mixed $memCache The memcache instance (or memcached if {@link useMemcached} is true) used by this component. + * @property array $servers List of memcache server configurations. Each element is a {@link CMemCacheServerConfiguration}. + * * @author Qiang Xue * @version $Id$ * @package system.caching diff --git a/framework/caching/dependencies/CCacheDependency.php b/framework/caching/dependencies/CCacheDependency.php index 8a72cd46a4..f3f8cec901 100644 --- a/framework/caching/dependencies/CCacheDependency.php +++ b/framework/caching/dependencies/CCacheDependency.php @@ -15,6 +15,10 @@ * Child classes should override its {@link generateDependentData} for * actual dependency checking. * + * @property boolean $hasChanged Whether the dependency has changed. + * @property mixed $dependentData The data used to determine if dependency has been changed. + * This data is available after {@link evaluateDependency} is called. + * * @author Qiang Xue * @version $Id$ * @package system.caching.dependencies diff --git a/framework/caching/dependencies/CChainedCacheDependency.php b/framework/caching/dependencies/CChainedCacheDependency.php index 718b101666..032c2043a4 100644 --- a/framework/caching/dependencies/CChainedCacheDependency.php +++ b/framework/caching/dependencies/CChainedCacheDependency.php @@ -18,6 +18,9 @@ * which gives a {@link CTypedList} instance and can be used like an array * (see {@link CList} for more details}). * + * @property CTypedList $dependencies List of dependency objects. + * @property boolean $hasChanged Whether the dependency is changed or not. + * * @author Qiang Xue * @version $Id$ * @package system.caching.dependencies diff --git a/framework/cli/commands/ShellCommand.php b/framework/cli/commands/ShellCommand.php index b2540ef94f..520d366907 100644 --- a/framework/cli/commands/ShellCommand.php +++ b/framework/cli/commands/ShellCommand.php @@ -12,6 +12,8 @@ /** * ShellCommand executes the specified Web application and provides a shell for interaction. * + * @property string $help The help information for the shell command. + * * @author Qiang Xue * @version $Id$ * @package system.cli.commands diff --git a/framework/cli/commands/shell/HelpCommand.php b/framework/cli/commands/shell/HelpCommand.php index 7b1648d26c..d07c40bdff 100644 --- a/framework/cli/commands/shell/HelpCommand.php +++ b/framework/cli/commands/shell/HelpCommand.php @@ -12,6 +12,8 @@ /** * HelpCommand displays help information for commands under yiic shell. * + * @property string $help The command description. + * * @author Qiang Xue * @version $Id$ * @package system.cli.commands.shell diff --git a/framework/console/CConsoleApplication.php b/framework/console/CConsoleApplication.php index 6daf2a4216..6def9c781d 100644 --- a/framework/console/CConsoleApplication.php +++ b/framework/console/CConsoleApplication.php @@ -36,6 +36,9 @@ * php path/to/entry_script.php help * * + * @property string $commandPath The directory that contains the command classes. Defaults to 'protected/commands'. + * @property CConsoleCommandRunner $commandRunner The command runner. + * * @author Qiang Xue * @version $Id$ * @package system.console diff --git a/framework/console/CConsoleCommand.php b/framework/console/CConsoleCommand.php index 5500fd968e..a36c718e42 100644 --- a/framework/console/CConsoleCommand.php +++ b/framework/console/CConsoleCommand.php @@ -34,6 +34,12 @@ * } * * + * @property string $name The command name. + * @property CConsoleCommandRunner $commandRunner The command runner instance. + * @property string $help The command description. Defaults to 'Usage: php entry-script.php command-name'. + * @property array $optionHelp The command option help information. Each array element describes + * the help information for a single action. + * * @author Qiang Xue * @version $Id$ * @package system.console diff --git a/framework/console/CConsoleCommandRunner.php b/framework/console/CConsoleCommandRunner.php index 2128253163..e658487111 100644 --- a/framework/console/CConsoleCommandRunner.php +++ b/framework/console/CConsoleCommandRunner.php @@ -11,6 +11,8 @@ /** * CConsoleCommandRunner manages commands and executes the requested command. * + * @property string $scriptName The entry script name. + * * @author Qiang Xue * @version $Id$ * @package system.console diff --git a/framework/console/CHelpCommand.php b/framework/console/CHelpCommand.php index f068ae6e67..2bcb4f354a 100644 --- a/framework/console/CHelpCommand.php +++ b/framework/console/CHelpCommand.php @@ -21,6 +21,8 @@ * In the above, if the command name is not provided, it will display all * available commands. * + * @property string $help The command description. + * * @author Qiang Xue * @version $Id$ * @package system.console diff --git a/framework/db/CDbCommand.php b/framework/db/CDbCommand.php index 2e7f7371f5..0eb550a341 100644 --- a/framework/db/CDbCommand.php +++ b/framework/db/CDbCommand.php @@ -38,6 +38,25 @@ * ->queryRow(); * * + * @property string $text The SQL statement to be executed. + * @property CDbConnection $connection The connection associated with this command. + * @property PDOStatement $pdoStatement The underlying PDOStatement for this command + * It could be null if the statement is not prepared yet. + * @property string $select The SELECT part (without 'SELECT') in the query. + * @property boolean $distinct A value indicating whether SELECT DISTINCT should be used. + * @property string $from The FROM part (without 'FROM' ) in the query. + * @property string $where The WHERE part (without 'WHERE' ) in the query. + * @property mixed $join The join part in the query. This can be an array representing + * multiple join fragments, or a string representing a single jojin fragment. + * Each join fragment will contain the proper join operator (e.g. LEFT JOIN). + * @property string $group The GROUP BY part (without 'GROUP BY' ) in the query. + * @property string $having The HAVING part (without 'HAVING' ) in the query. + * @property string $order The ORDER BY part (without 'ORDER BY' ) in the query. + * @property string $limit The LIMIT part (without 'LIMIT' ) in the query. + * @property string $offset The OFFSET part (without 'OFFSET' ) in the query. + * @property mixed $union The UNION part (without 'UNION' ) in the query. + * This can be either a string or an array representing multiple union parts. + * * @author Qiang Xue * @version $Id$ * @package system.db diff --git a/framework/db/CDbConnection.php b/framework/db/CDbConnection.php index 419f804f1f..47497cbc80 100644 --- a/framework/db/CDbConnection.php +++ b/framework/db/CDbConnection.php @@ -78,6 +78,27 @@ * ) * * + * @property boolean $active Whether the DB connection is established. + * @property PDO $pdoInstance The PDO instance, null if the connection is not established yet. + * @property CDbTransaction $currentTransaction The currently active transaction. Null if no active transaction. + * @property CDbSchema $schema The database schema for the current connection. + * @property CDbCommandBuilder $commandBuilder The command builder. + * @property string $lastInsertID The row ID of the last row inserted, or the last value retrieved from the sequence object. + * @property mixed $columnCase The case of the column names. + * @property mixed $nullConversion How the null and empty strings are converted. + * @property boolean $autoCommit Whether creating or updating a DB record will be automatically committed. + * @property boolean $persistent Whether the connection is persistent or not. + * @property string $driverName Name of the DB driver. + * @property string $clientVersion The version information of the DB driver. + * @property string $connectionStatus The status of the connection. + * @property boolean $prefetch Whether the connection performs data prefetching. + * @property string $serverInfo The information of DBMS server. + * @property string $serverVersion The version information of DBMS server. + * @property integer $timeout Timeout settings for the connection. + * @property array $attributes Attributes (name=>value) that are previously explicitly set for the DB connection. + * @property array $stats The first element indicates the number of SQL statements executed, + * and the second element the total time spent in SQL execution. + * * @author Qiang Xue * @version $Id$ * @package system.db diff --git a/framework/db/CDbDataReader.php b/framework/db/CDbDataReader.php index 9c61136478..9e247cf058 100644 --- a/framework/db/CDbDataReader.php +++ b/framework/db/CDbDataReader.php @@ -25,6 +25,11 @@ * {@link setFetchMode FetchMode}. See {@link http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php} * for more details. * + * @property boolean $isClosed Whether the reader is closed or not. + * @property integer $rowCount Number of rows contained in the result. + * @property integer $columnCount The number of columns in the result set. + * @property mixed $fetchMode Fetch mode. + * * @author Qiang Xue * @version $Id$ * @package system.db diff --git a/framework/db/CDbMigration.php b/framework/db/CDbMigration.php index eadc11e4fc..71ab4f3861 100644 --- a/framework/db/CDbMigration.php +++ b/framework/db/CDbMigration.php @@ -27,6 +27,8 @@ * information showing the method parameters and execution time, which may be useful when * applying migrations. * + * @property CDbConnection $dbConnection The currently active database connection. + * * @author Qiang Xue * @version $Id$ * @package system.db diff --git a/framework/db/CDbTransaction.php b/framework/db/CDbTransaction.php index f397f705e8..ef4706b774 100644 --- a/framework/db/CDbTransaction.php +++ b/framework/db/CDbTransaction.php @@ -29,6 +29,9 @@ * } * * + * @property CDbConnection $connection The DB connection for this transaction. + * @property boolean $active Whether this transaction is active. + * * @author Qiang Xue * @version $Id$ * @package system.db diff --git a/framework/db/schema/CDbCommandBuilder.php b/framework/db/schema/CDbCommandBuilder.php index a784ac526f..26237de9cc 100644 --- a/framework/db/schema/CDbCommandBuilder.php +++ b/framework/db/schema/CDbCommandBuilder.php @@ -11,6 +11,9 @@ /** * CDbCommandBuilder provides basic methods to create query commands for tables. * + * @property CDbConnection $dbConnection Database connection. + * @property CDbSchema $schema The schema for this command builder. + * * @author Qiang Xue * @version $Id$ * @package system.db.schema diff --git a/framework/db/schema/CDbSchema.php b/framework/db/schema/CDbSchema.php index 0514c1b935..9e918e513f 100644 --- a/framework/db/schema/CDbSchema.php +++ b/framework/db/schema/CDbSchema.php @@ -11,6 +11,13 @@ /** * CDbSchema is the base class for retrieving metadata information. * + * @property CDbConnection $dbConnection Database connection. The connection is active. + * @property array $tables The metadata for all tables in the database. + * Each array element is an instance of {@link CDbTableSchema} (or its child class). + * The array keys are table names. + * @property array $tableNames All table names in the database. + * @property CDbCommandBuilder $commandBuilder The SQL command builder for this connection. + * * @author Qiang Xue * @version $Id$ * @package system.db.schema diff --git a/framework/db/schema/CDbTableSchema.php b/framework/db/schema/CDbTableSchema.php index ceae04afa2..d5f3eb7b1d 100644 --- a/framework/db/schema/CDbTableSchema.php +++ b/framework/db/schema/CDbTableSchema.php @@ -23,6 +23,8 @@ *
  • {@link sequenceName}
  • * * + * @property array $columnNames List of column names. + * * @author Qiang Xue * @version $Id$ * @package system.db.schema diff --git a/framework/db/schema/oci/COciSchema.php b/framework/db/schema/oci/COciSchema.php index 993cec5901..697ef78d2d 100644 --- a/framework/db/schema/oci/COciSchema.php +++ b/framework/db/schema/oci/COciSchema.php @@ -11,6 +11,8 @@ /** * COciSchema is the class for retrieving metadata information from an Oracle database. * + * @property string $defaultSchema Default schema. + * * @author Ricardo Grana * @version $Id$ * @package system.db.schema.oci diff --git a/framework/gii/CCodeFile.php b/framework/gii/CCodeFile.php index e8c7a5e8b9..bfa4247bb4 100644 --- a/framework/gii/CCodeFile.php +++ b/framework/gii/CCodeFile.php @@ -11,6 +11,9 @@ /** * CCodeFile represents a code file being generated. * + * @property string $relativePath The code file path relative to the application base path. + * @property string $type The code file extension (e.g. php, txt). + * * @author Qiang Xue * @version $Id$ * @package system.gii diff --git a/framework/gii/CCodeGenerator.php b/framework/gii/CCodeGenerator.php index 7a5fd5448d..9df8d7c44c 100644 --- a/framework/gii/CCodeGenerator.php +++ b/framework/gii/CCodeGenerator.php @@ -18,6 +18,9 @@ * while the latter should return a success message to be displayed when * code files are successfully generated. * + * @property string $pageTitle The page title. + * @property string $viewPath The view path of the generator. + * * @author Qiang Xue * @version $Id$ * @package system.gii diff --git a/framework/gii/CCodeModel.php b/framework/gii/CCodeModel.php index 2ffde25138..4c4849f21f 100644 --- a/framework/gii/CCodeModel.php +++ b/framework/gii/CCodeModel.php @@ -26,6 +26,10 @@ * and reopen it. To declare an attribute is sticky, simply list it in a validation rule with * the validator name being "sticky". * + * @property array $templates A list of available code templates (name=>directory). + * @property string $templatePath The directory that contains the template files. + * @property string $stickyFile The file path that stores the sticky attribute values. + * * @author Qiang Xue * @version $Id$ * @package system.gii diff --git a/framework/gii/GiiModule.php b/framework/gii/GiiModule.php index 8906966f13..eb82eb4b28 100644 --- a/framework/gii/GiiModule.php +++ b/framework/gii/GiiModule.php @@ -62,6 +62,8 @@ * * http://localhost/path/to/index.php/gii * + * @property string $assetsUrl The base URL that contains all published asset files of gii. + * * @author Qiang Xue * @version $Id$ * @package system.gii diff --git a/framework/i18n/CDbMessageSource.php b/framework/i18n/CDbMessageSource.php index 1fe0543cc4..e956c049a7 100644 --- a/framework/i18n/CDbMessageSource.php +++ b/framework/i18n/CDbMessageSource.php @@ -35,6 +35,8 @@ * * When {@link cachingDuration} is set as a positive number, message translations will be cached. * + * @property CDbConnection $dbConnection The DB connection used for the message source. + * * @author Qiang Xue * @version $Id$ * @package system.i18n diff --git a/framework/i18n/CLocale.php b/framework/i18n/CLocale.php index 15d85ed70d..8bffdbcc71 100644 --- a/framework/i18n/CLocale.php +++ b/framework/i18n/CLocale.php @@ -13,6 +13,23 @@ * * The data includes the number formatting information and date formatting information. * + * @property string $id The locale ID (in canonical form). + * @property CNumberFormatter $numberFormatter The number formatter for this locale. + * @property CDateFormatter $dateFormatter The date formatter for this locale. + * @property string $decimalFormat The decimal format. + * @property string $currencyFormat The currency format. + * @property string $percentFormat The percent format. + * @property string $scientificFormat The scientific format. + * @property array $monthNames Month names indexed by month values (1-12). + * @property array $weekDayNames The weekday names indexed by weekday values (0-6, 0 means Sunday, 1 Monday, etc.). + * @property string $aMName The AM name. + * @property string $pMName The PM name. + * @property string $dateFormat Date format. + * @property string $timeFormat Date format. + * @property string $dateTimeFormat Datetime format, i.e., the order of date and time. + * @property string $orientation The character orientation, which is either 'ltr' (left-to-right) or 'rtl' (right-to-left). + * @property array $pluralRules Plural forms expressions. + * * @author Qiang Xue * @version $Id$ * @package system.i18n diff --git a/framework/i18n/CMessageSource.php b/framework/i18n/CMessageSource.php index 0104b49052..4e9c9106da 100644 --- a/framework/i18n/CMessageSource.php +++ b/framework/i18n/CMessageSource.php @@ -17,6 +17,9 @@ * * A concrete class must implement {@link loadMessages} or override {@link translateMessage}. * + * @property string $language The language that the source messages are written in. + * Defaults to {@link CApplication::language application language}. + * * @author Qiang Xue * @version $Id$ * @package system.i18n diff --git a/framework/logging/CEmailLogRoute.php b/framework/logging/CEmailLogRoute.php index b0a32a211d..13c31b8638 100644 --- a/framework/logging/CEmailLogRoute.php +++ b/framework/logging/CEmailLogRoute.php @@ -15,6 +15,11 @@ * Optionally, you may set the email {@link setSubject subject}, the * {@link setSentFrom sentFrom} address and any additional {@link setHeaders headers}. * + * @property array $emails List of destination email addresses. + * @property string $subject Email subject. Defaults to CEmailLogRoute::DEFAULT_SUBJECT. + * @property string $sentFrom Send from address of the email. + * @property array $headers Additional headers to use when sending an email. + * * @author Qiang Xue * @version $Id$ * @package system.logging diff --git a/framework/logging/CFileLogRoute.php b/framework/logging/CFileLogRoute.php index 3c46a67345..252132345e 100644 --- a/framework/logging/CFileLogRoute.php +++ b/framework/logging/CFileLogRoute.php @@ -19,6 +19,11 @@ * to '.3', '.1' to '.2'. The property {@link setMaxLogFiles maxLogFiles} * specifies how many files to be kept. * + * @property string $logPath Directory storing log files. Defaults to application runtime path. + * @property string $logFile Log file name. Defaults to 'application.log'. + * @property integer $maxFileSize Maximum log file size in kilo-bytes (KB). Defaults to 1024 (1MB). + * @property integer $maxLogFiles Number of files used for rotation. Defaults to 5. + * * @author Qiang Xue * @version $Id$ * @package system.logging diff --git a/framework/logging/CLogRouter.php b/framework/logging/CLogRouter.php index 94044be142..6bd71df319 100644 --- a/framework/logging/CLogRouter.php +++ b/framework/logging/CLogRouter.php @@ -43,6 +43,8 @@ * You can specify multiple routes with different filtering conditions and different * targets, even if the routes are of the same type. * + * @property array $routes The currently initialized routes. + * * @author Qiang Xue * @version $Id$ * @package system.logging diff --git a/framework/logging/CLogger.php b/framework/logging/CLogger.php index 9fdc65f75f..ed6aac42d8 100644 --- a/framework/logging/CLogger.php +++ b/framework/logging/CLogger.php @@ -14,6 +14,17 @@ * CLogger implements the methods to retrieve the messages with * various filter conditions, including log levels and log categories. * + * @property array $logs List of messages. Each array elements represents one message + * with the following structure: + * array( + * [0] => message (string) + * [1] => level (string) + * [2] => category (string) + * [3] => timestamp (float, obtained by microtime(true));. + * @property float $executionTime The total time for serving the current request. + * @property integer $memoryUsage Memory usage of the application (in bytes). + * @property array $profilingResults The profiling results. + * * @author Qiang Xue * @version $Id$ * @package system.logging diff --git a/framework/logging/CProfileLogRoute.php b/framework/logging/CProfileLogRoute.php index 50091baf3b..edb2510036 100644 --- a/framework/logging/CProfileLogRoute.php +++ b/framework/logging/CProfileLogRoute.php @@ -20,6 +20,8 @@ *
  • callstack: list the mark code blocks in a hierarchical view reflecting their calling sequence.
  • * * + * @property string $report The type of the profiling report to display. Defaults to 'summary'. + * * @author Qiang Xue * @version $Id$ * @package system.logging diff --git a/framework/test/CDbFixtureManager.php b/framework/test/CDbFixtureManager.php index 626679df90..01a9af3619 100644 --- a/framework/test/CDbFixtureManager.php +++ b/framework/test/CDbFixtureManager.php @@ -31,6 +31,9 @@ * the database. If this file is not found, all available fixtures will be loaded * into the database. * + * @property CDbConnection $dbConnection The database connection. + * @property array $fixtures The information of the available fixtures (table name => fixture file). + * * @author Qiang Xue * @version $Id$ * @package system.test diff --git a/framework/test/CDbTestCase.php b/framework/test/CDbTestCase.php index a92ca38f6d..9a40341452 100644 --- a/framework/test/CDbTestCase.php +++ b/framework/test/CDbTestCase.php @@ -31,6 +31,8 @@ * corresponding to a fixture data row using $this->posts('first post'). * Note, here 'first post' refers to a key to a row in the original fixture data. * + * @property CDbFixtureManager $fixtureManager The database fixture manager. + * * @author Qiang Xue * @version $Id$ * @package system.test diff --git a/framework/test/CWebTestCase.php b/framework/test/CWebTestCase.php index 204f565d36..e676d4afc5 100644 --- a/framework/test/CWebTestCase.php +++ b/framework/test/CWebTestCase.php @@ -16,6 +16,8 @@ * It extends PHPUnit_Extensions_SeleniumTestCase and provides the database * fixture management feature like {@link CDbTestCase}. * + * @property CDbFixtureManager $fixtureManager The database fixture manager. + * * @author Qiang Xue * @version $Id$ * @package system.test diff --git a/framework/utils/CFormatter.php b/framework/utils/CFormatter.php index f7c8e1bc75..95ef425450 100644 --- a/framework/utils/CFormatter.php +++ b/framework/utils/CFormatter.php @@ -39,6 +39,8 @@ * By default, {@link CApplication} registers {@link CFormatter} as an application component whose ID is 'format'. * Therefore, one may call Yii::app()->format->boolean(1). * + * @property CHtmlPurifier $htmlPurifier The HTML purifier instance. + * * @author Qiang Xue * @version $Id$ * @package system.utils diff --git a/framework/utils/CMarkdownParser.php b/framework/utils/CMarkdownParser.php index c5e11b68dd..9f5e8ccb54 100644 --- a/framework/utils/CMarkdownParser.php +++ b/framework/utils/CMarkdownParser.php @@ -41,6 +41,8 @@ *
  • {@link http://michelf.com/projects/php-markdown/extra/ markdown extra syntax}
  • * * + * @property string $defaultCssFile The default CSS file that is used to highlight code blocks. + * * @author Qiang Xue * @version $Id$ * @package system.utils diff --git a/framework/web/CActiveDataProvider.php b/framework/web/CActiveDataProvider.php index 1616f2587e..f954f64f06 100644 --- a/framework/web/CActiveDataProvider.php +++ b/framework/web/CActiveDataProvider.php @@ -31,6 +31,9 @@ * // $dataProvider->getData() will return a list of Post objects * * + * @property CDbCriteria $criteria The query criteria. + * @property CSort $sort The sorting object. If this is false, it means the sorting is disabled. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CAssetManager.php b/framework/web/CAssetManager.php index 0d00f3910b..25415fda4b 100644 --- a/framework/web/CAssetManager.php +++ b/framework/web/CAssetManager.php @@ -23,6 +23,10 @@ * The property {@link setBaseUrl baseUrl} refers to the URL for accessing * the {@link setBasePath basePath}. * + * @property string $basePath The root directory storing the published asset files. Defaults to 'WebRoot/assets'. + * @property string $baseUrl The base url that the published asset files can be accessed. + * Note, the ending slashes are stripped off. Defaults to '/AppBaseUrl/assets'. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CCacheHttpSession.php b/framework/web/CCacheHttpSession.php index 503a9adc04..6e6a4aa814 100644 --- a/framework/web/CCacheHttpSession.php +++ b/framework/web/CCacheHttpSession.php @@ -20,6 +20,8 @@ * is NOT volatile. If you want to use {@link CDbCache} as storage medium, use {@link CDbHttpSession} * is a better choice. * + * @property boolean $useCustomStorage Whether to use custom storage. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CClientScript.php b/framework/web/CClientScript.php index abb705e5bd..3468bdee25 100644 --- a/framework/web/CClientScript.php +++ b/framework/web/CClientScript.php @@ -11,6 +11,8 @@ /** * CClientScript manages JavaScript and CSS stylesheets for views. * + * @property string $coreScriptUrl The base URL of all core javascript files. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CController.php b/framework/web/CController.php index 14ddafd5f4..9e4289988c 100644 --- a/framework/web/CController.php +++ b/framework/web/CController.php @@ -57,6 +57,18 @@ * while the '-' operator means the filter runs only when the requested action is not among those actions. * For object-based filters, the '+' and '-' operators are following the class name. * + * @property array $actionParams The request parameters to be used for action parameter binding. + * @property CAction $action The action currently being executed, null if no active action. + * @property string $id ID of the controller. + * @property string $uniqueId The controller ID that is prefixed with the module ID (if any). + * @property string $route The route (module ID, controller ID and action ID) of the current request. + * @property CWebModule $module The module that this controller belongs to. It returns null + * if the controller does not belong to any module. + * @property string $viewPath The directory containing the view files for this controller. Defaults to 'protected/views/ControllerID'. + * @property CMap $clips The list of clips. + * @property string $pageTitle The page title. Defaults to the controller name and the action name. + * @property CStack $cachingStack Stack of {@link COutputCache} objects. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CDataProvider.php b/framework/web/CDataProvider.php index d710d99571..6e09965b87 100644 --- a/framework/web/CDataProvider.php +++ b/framework/web/CDataProvider.php @@ -5,6 +5,15 @@ * Derived classes mainly need to implement three methods: {@link fetchData}, * {@link fetchKeys} and {@link calculateTotalItemCount}. * + * @property string $id The unique ID that uniquely identifies the data provider among all data providers. + * @property CPagination $pagination The pagination object. If this is false, it means the pagination is disabled. + * @property CSort $sort The sorting object. If this is false, it means the sorting is disabled. + * @property array $data The list of data items currently available in this data provider. + * @property array $keys The list of key values corresponding to {@link data}. Each data item in {@link data} + * is uniquely identified by the corresponding key value in this array. + * @property integer $itemCount The number of data items in the current page. + * @property integer $totalItemCount Total number of possible data items. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CDbHttpSession.php b/framework/web/CDbHttpSession.php index 1d99ac249f..b3399c7ece 100644 --- a/framework/web/CDbHttpSession.php +++ b/framework/web/CDbHttpSession.php @@ -35,6 +35,8 @@ * and set {@link autoCreateSessionTable} to be false. This will greatly improve the performance. * You may also create a DB index for the 'expire' column in the session table to further improve the performance. * + * @property boolean $useCustomStorage Whether to use custom storage. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CExtController.php b/framework/web/CExtController.php index 84065819f1..86a984c13a 100644 --- a/framework/web/CExtController.php +++ b/framework/web/CExtController.php @@ -16,6 +16,8 @@ * so that it points to the "views" subdirectory under the directory containing * the controller class file. * + * @property string $viewPath The directory containing the view files for this controller. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CHttpRequest.php b/framework/web/CHttpRequest.php index 786e3e9e35..81c39ab4ef 100644 --- a/framework/web/CHttpRequest.php +++ b/framework/web/CHttpRequest.php @@ -21,38 +21,41 @@ * CHttpRequest is a default application component loaded by {@link CWebApplication}. It can be * accessed via {@link CWebApplication::getRequest()}. * + * @property string $url Part of the request URL after the host info. + * @property string $hostInfo Schema and hostname part (with port number if needed) of the request URL (e.g. http://www.yiiframework.com). + * @property string $baseUrl The relative URL for the application. + * @property string $scriptUrl The relative URL of the entry script. + * @property string $pathInfo Part of the request URL that is after the entry script and before the question mark. + * Note, the returned pathinfo is decoded starting from 1.1.4. + * Prior to 1.1.4, whether it is decoded or not depends on the server configuration + * (in most cases it is not decoded). + * @property string $requestUri The request URI portion for the currently requested URL. + * @property string $queryString Part of the request URL that is after the question mark. + * @property boolean $isSecureConnection If the request is sent via secure channel (https). + * @property string $requestType Request type, such as GET, POST, HEAD, PUT, DELETE. + * @property boolean $isPostRequest Whether this is a POST request. + * @property boolean $isDeleteRequest Whether this is a DELETE request. + * @property boolean $isPutRequest Whether this is a PUT request. + * @property boolean $isAjaxRequest Whether this is an AJAX (XMLHttpRequest) request. + * @property string $serverName Server name. + * @property integer $serverPort Server port number. + * @property string $urlReferrer URL referrer, null if not present. + * @property string $userAgent User agent, null if not present. + * @property string $userHostAddress User IP address. + * @property string $userHost User host name, null if cannot be determined. + * @property string $scriptFile Entry script file path (processed w/ realpath()). + * @property array $browser User browser capabilities. + * @property string $acceptTypes User browser accept types, null if not present. + * @property integer $port Port number for insecure requests. + * @property integer $securePort Port number for secure requests. + * @property CCookieCollection $cookies The cookie collection. + * @property string $preferredLanguage The user preferred language. + * @property string $csrfToken The random token for CSRF validation. + * * @author Qiang Xue * @version $Id$ * @package system.web * @since 1.0 - * - * @property string $acceptTypes Returns user browser accept types, null if not present. - * @property string $baseUrl Returns the relative URL for the application. - * @property array $browser Returns information about the capabilities of user browser. - * @property CCookieCollection $cookies Returns the cookie collection. - * @property string $csrfToken Returns the random token used to perform CSRF validation. - * @property string $hostInfo Returns the schema and host part of the application URL. - * @property boolean $isAjaxRequest Returns whether this is an AJAX (XMLHttpRequest) request. - * @property boolean $isDeleteRequest Returns whether this is a DELETE request. - * @property boolean $isPostRequest Returns whether this is a POST request. - * @property boolean $isPutRequest Returns whether this is a PUT request. - * @property boolean $isSecureConnection Return if the request is sent via secure channel (https). - * @property string $pathInfo Returns the path info of the currently requested URL. - * @property int $port Returns the port to use for insecure requests. - * @property string $preferredLanguage Returns the user preferred language. - * @property string $queryString Returns part of the request URL that is after the question mark. - * @property string $requestType Returns the request type, such as GET, POST, HEAD, PUT, DELETE. - * @property string $requestUri Returns the request URI portion for the currently requested URL. - * @property string $scriptFile Returns entry script file path. - * @property string $scriptUrl Returns the relative URL of the entry script. - * @property int $securePort Returns the port to use for secure requests. - * @property string $serverName Returns the server name. - * @property int $serverPort Returns the server port number. - * @property string $url Returns the currently requested URL. - * @property string $urlReferrer Returns the URL referrer, null if not present. - * @property string $userAgent Returns the user agent, null if not present. - * @property string $userHost Returns the user host name, null if it cannot be determined. - * @property string $userHostAddress Returns the user IP address. */ class CHttpRequest extends CApplicationComponent { diff --git a/framework/web/CHttpSession.php b/framework/web/CHttpSession.php index ee51a722dc..b5dc635f6f 100644 --- a/framework/web/CHttpSession.php +++ b/framework/web/CHttpSession.php @@ -51,6 +51,20 @@ * CHttpSession is a Web application component that can be accessed via * {@link CWebApplication::getSession()}. * + * @property boolean $useCustomStorage Whether to use custom storage. + * @property boolean $isStarted Whether the session has started. + * @property string $sessionID The current session ID. + * @property string $sessionName The current session name. + * @property string $savePath The current session save path, defaults to '/tmp'. + * @property array $cookieParams The session cookie parameters. + * @property string $cookieMode How to use cookie to store session ID. Defaults to 'Allow'. + * @property integer $gCProbability The probability (percentage) that the gc (garbage collection) process is started on every session initialization, defaults to 1 meaning 1% chance. + * @property boolean $useTransparentSessionID Whether transparent sid support is enabled or not, defaults to false. + * @property integer $timeout The number of seconds after which data will be seen as 'garbage' and cleaned up, defaults to 1440 seconds. + * @property CHttpSessionIterator $iterator An iterator for traversing the session variables. + * @property integer $count The number of session variables. + * @property array $keys The list of session variable names. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CPagination.php b/framework/web/CPagination.php index bd167f05e3..a810f1968b 100644 --- a/framework/web/CPagination.php +++ b/framework/web/CPagination.php @@ -50,6 +50,16 @@ * )) ?> * * + * @property integer $pageSize Number of items in each page. Defaults to 10. + * @property integer $itemCount Total number of items. Defaults to 0. + * @property integer $pageCount Number of pages. + * @property integer $currentPage The zero-based index of the current page. Defaults to 0. + * @property integer $offset The offset of the data. This may be used to set the + * OFFSET value for a SQL statement for fetching the current page of data. + * @property integer $limit The limit of the data. This may be used to set the + * LIMIT value for a SQL statement for fetching the current page of data. + * This returns the same value as {@link pageSize}. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CSort.php b/framework/web/CSort.php index 5319a9eda7..c5f469eb0b 100644 --- a/framework/web/CSort.php +++ b/framework/web/CSort.php @@ -36,6 +36,12 @@ * represent the attribute names, while the values represent the virtual attribute definitions. * For more details, please check the documentation about {@link attributes}. * + * @property string $orderBy The order-by columns represented by this sort object. + * This can be put in the ORDER BY clause of a SQL statement. + * @property array $directions Sort directions indexed by attribute names. + * The sort direction is true if the corresponding attribute should be + * sorted in descending order. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CTheme.php b/framework/web/CTheme.php index 88a9bfd0bd..337e968d52 100644 --- a/framework/web/CTheme.php +++ b/framework/web/CTheme.php @@ -11,6 +11,13 @@ /** * CTheme represents an application theme. * + * @property string $name Theme name. + * @property string $baseUrl The relative URL to the theme folder (without ending slash). + * @property string $basePath The file path to the theme folder. + * @property string $viewPath The path for controller views. Defaults to 'ThemeRoot/views'. + * @property string $systemViewPath The path for system views. Defaults to 'ThemeRoot/views/system'. + * @property string $skinPath The path for widget skins. Defaults to 'ThemeRoot/views/skins'. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CThemeManager.php b/framework/web/CThemeManager.php index 7cd36330a6..acb2efb432 100644 --- a/framework/web/CThemeManager.php +++ b/framework/web/CThemeManager.php @@ -26,6 +26,10 @@ * Since a self-contained theme often contains resource files that are made * Web accessible, please make sure the view/layout files are protected from Web access. * + * @property array $themeNames List of available theme names. + * @property string $basePath The base path for all themes. Defaults to "WebRootPath/themes". + * @property string $baseUrl The base URL for all themes. Defaults to "/WebRoot/themes". + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CUploadedFile.php b/framework/web/CUploadedFile.php index 321f8b2e5e..0de5725c68 100644 --- a/framework/web/CUploadedFile.php +++ b/framework/web/CUploadedFile.php @@ -16,6 +16,21 @@ * You may also query other information about the file, including {@link name}, * {@link tempName}, {@link type}, {@link size} and {@link error}. * + * @property string $name The original name of the file being uploaded. + * @property string $tempName The path of the uploaded file on the server. + * Note, this is a temporary file which will be automatically deleted by PHP + * after the current request is processed. + * @property string $type The MIME-type of the uploaded file (such as "image/gif"). + * Since this MIME type is not checked on the server side, do not take this value for granted. + * Instead, use {@link CFileHelper::getMimeType} to determine the exact MIME type. + * @property integer $size The actual size of the uploaded file in bytes. + * @property integer $error The error code. + * @property boolean $hasError Whether there is an error with the uploaded file. + * Check {@link error} for detailed error code information. + * @property string $extensionName The file extension name for {@link name}. + * The extension name does not include the dot character. An empty string + * is returned if {@link name} does not have an extension name. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CUrlManager.php b/framework/web/CUrlManager.php index 8ebf0d6858..a139028023 100644 --- a/framework/web/CUrlManager.php +++ b/framework/web/CUrlManager.php @@ -111,6 +111,12 @@ * CUrlManager is a default application component that may be accessed via * {@link CWebApplication::getUrlManager()}. * + * @property string $baseUrl The base URL of the application (the part after host name and before query string). + * If {@link showScriptName} is true, it will include the script name part. + * Otherwise, it will not, and the ending slashes are stripped off. + * @property string $urlFormat The URL format. Defaults to 'path'. Valid values include 'path' and 'get'. + * Please refer to the guide for more details about the difference between these two formats. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/CWebApplication.php b/framework/web/CWebApplication.php index 6386bf28da..d625de44e3 100644 --- a/framework/web/CWebApplication.php +++ b/framework/web/CWebApplication.php @@ -36,26 +36,25 @@ * For example, the controller 'article' is defined by the class 'ArticleController' * which is in the file 'protected/controllers/ArticleController.php'. * + * @property IAuthManager $authManager The authorization manager component. + * @property CAssetManager $assetManager The asset manager component. + * @property CHttpSession $session The session component. + * @property CWebUser $user The user session information. + * @property IViewRenderer $viewRenderer The view renderer. + * @property CClientScript $clientScript The client script manager. + * @property IWidgetFactory $widgetFactory The widget factory. + * @property CThemeManager $themeManager The theme manager. + * @property CTheme $theme The theme used currently. Null if no theme is being used. + * @property CController $controller The currently active controller. + * @property string $controllerPath The directory that contains the controller classes. Defaults to 'protected/controllers'. + * @property string $viewPath The root directory of view files. Defaults to 'protected/views'. + * @property string $systemViewPath The root directory of system view files. Defaults to 'protected/views/system'. + * @property string $layoutPath The root directory of layout files. Defaults to 'protected/views/layouts'. + * * @author Qiang Xue * @version $Id$ * @package system.web * @since 1.0 - * - * @property CHttpSession $session the session component - * @property CAssetManager $assetManager the asset manager component - * @property CWebUser $user the user session information - * @property CThemeManager $themeManager the theme manager - * @property IAuthManager $authManager the authorization manager component - * @property CClientScript $clientScript the client script manager - * @property IWidgetFactory $widgetFactory the widget factory - * @property IViewRenderer $viewRenderer the view renderer - * - * @property CController $controller the currently active controller - * @property CTheme $theme the theme used currently - * @property string $controllerPath the directory that contains the controller classes - * @property string $layoutPath the root directory of layout files - * @property string $systemViewPath the root directory of system view files - * @property string $viewPath the root directory of view files */ class CWebApplication extends CApplication { diff --git a/framework/web/CWebModule.php b/framework/web/CWebModule.php index 18bec05ada..8d3fc91ad8 100644 --- a/framework/web/CWebModule.php +++ b/framework/web/CWebModule.php @@ -16,6 +16,13 @@ * project as a whole. Controllers inside a module must be accessed with routes * that are prefixed with the module ID. * + * @property string $name The name of this module. + * @property string $description The description of this module. + * @property string $version The version of this module. + * @property string $controllerPath The directory that contains the controller classes. Defaults to 'protected/controllers'. + * @property string $viewPath The root directory of view files. Defaults to 'protected/views'. + * @property string $layoutPath The root directory of layout files. Defaults to 'protected/views/layouts'. + * * @author Qiang Xue * @version $Id$ * @package system.web diff --git a/framework/web/actions/CAction.php b/framework/web/actions/CAction.php index 0f88daf179..415c42132f 100644 --- a/framework/web/actions/CAction.php +++ b/framework/web/actions/CAction.php @@ -19,6 +19,9 @@ * * An action instance can access its controller via {@link getController controller} property. * + * @property CController $controller The controller who owns this action. + * @property string $id Id of this action. + * * @author Qiang Xue * @version $Id$ * @package system.web.actions diff --git a/framework/web/actions/CViewAction.php b/framework/web/actions/CViewAction.php index 806219cbea..67767aaf1a 100644 --- a/framework/web/actions/CViewAction.php +++ b/framework/web/actions/CViewAction.php @@ -22,6 +22,9 @@ * Note, the user specified view can only contain word characters, dots and dashes and * the first letter must be a word letter. * + * @property string $requestedView The name of the view requested by the user. + * This is in the format of 'path.to.view'. + * * @author Qiang Xue * @version $Id$ * @package system.web.actions diff --git a/framework/web/auth/CAccessControlFilter.php b/framework/web/auth/CAccessControlFilter.php index 6de213ffe3..51fd29bf83 100644 --- a/framework/web/auth/CAccessControlFilter.php +++ b/framework/web/auth/CAccessControlFilter.php @@ -49,6 +49,8 @@ * ) * * + * @property array $rules List of access rules. + * * @author Qiang Xue * @version $Id$ * @package system.web.auth diff --git a/framework/web/auth/CAuthAssignment.php b/framework/web/auth/CAuthAssignment.php index b37d70b073..8483bc6af3 100644 --- a/framework/web/auth/CAuthAssignment.php +++ b/framework/web/auth/CAuthAssignment.php @@ -14,6 +14,11 @@ * Do not create a CAuthAssignment instance using the 'new' operator. * Instead, call {@link IAuthManager::assign}. * + * @property mixed $userId User ID (see {@link IWebUser::getId}). + * @property string $itemName The authorization item name. + * @property string $bizRule The business rule associated with this assignment. + * @property mixed $data Additional data for this assignment. + * * @author Qiang Xue * @version $Id$ * @package system.web.auth diff --git a/framework/web/auth/CAuthItem.php b/framework/web/auth/CAuthItem.php index 7043f19310..1de933de14 100644 --- a/framework/web/auth/CAuthItem.php +++ b/framework/web/auth/CAuthItem.php @@ -16,6 +16,14 @@ * A user may be assigned one or several authorization items (called {@link CAuthAssignment assignments}. * He can perform an operation only when it is among his assigned items. * + * @property IAuthManager $authManager The authorization manager. + * @property integer $type The authorization item type. This could be 0 (operation), 1 (task) or 2 (role). + * @property string $name The item name. + * @property string $description The item description. + * @property string $bizRule The business rule associated with this item. + * @property string $data The additional data associated with this item. + * @property array $children All child items of this item. + * * @author Qiang Xue * @version $Id$ * @package system.web.auth diff --git a/framework/web/auth/CAuthManager.php b/framework/web/auth/CAuthManager.php index 8cafab2291..5ac47e083a 100644 --- a/framework/web/auth/CAuthManager.php +++ b/framework/web/auth/CAuthManager.php @@ -30,6 +30,10 @@ * at appropriate places in the application code to check if the current user * has the needed permission for an operation. * + * @property array $roles Roles (name=>CAuthItem). + * @property array $tasks Tasks (name=>CAuthItem). + * @property array $operations Operations (name=>CAuthItem). + * * @author Qiang Xue * @version $Id$ * @package system.web.auth diff --git a/framework/web/auth/CBaseUserIdentity.php b/framework/web/auth/CBaseUserIdentity.php index 3691ad00f6..1bae797793 100644 --- a/framework/web/auth/CBaseUserIdentity.php +++ b/framework/web/auth/CBaseUserIdentity.php @@ -19,6 +19,13 @@ * and {@link IUserIdentity::getId} that are required by the {@link IUserIdentity} * interface. * + * @property mixed $id A value that uniquely represents the identity (e.g. primary key value). + * The default implementation simply returns {@link name}. + * @property string $name The display name for the identity. + * The default implementation simply returns empty string. + * @property array $persistentStates The identity states that should be persisted. + * @property whether $isAuthenticated The authentication is successful. + * * @author Qiang Xue * @version $Id$ * @package system.web.auth diff --git a/framework/web/auth/CDbAuthManager.php b/framework/web/auth/CDbAuthManager.php index 804e0c867c..a5a3bc1602 100644 --- a/framework/web/auth/CDbAuthManager.php +++ b/framework/web/auth/CDbAuthManager.php @@ -16,6 +16,8 @@ * the three tables used to store the authorization data by setting {@link itemTable}, * {@link itemChildTable} and {@link assignmentTable}. * + * @property array $authItems The authorization items of the specific type. + * * @author Qiang Xue * @version $Id$ * @package system.web.auth diff --git a/framework/web/auth/CPhpAuthManager.php b/framework/web/auth/CPhpAuthManager.php index 94982671d9..9a9ece4166 100644 --- a/framework/web/auth/CPhpAuthManager.php +++ b/framework/web/auth/CPhpAuthManager.php @@ -18,6 +18,8 @@ * (for example, the authorization data for a personal blog system). * Use {@link CDbAuthManager} for more complex authorization data. * + * @property array $authItems The authorization items of the specific type. + * * @author Qiang Xue * @version $Id$ * @package system.web.auth diff --git a/framework/web/auth/CUserIdentity.php b/framework/web/auth/CUserIdentity.php index b8b36a0c64..952de6e44d 100644 --- a/framework/web/auth/CUserIdentity.php +++ b/framework/web/auth/CUserIdentity.php @@ -17,6 +17,9 @@ * By default, CUserIdentity assumes the {@link username} is a unique identifier * and thus use it as the {@link id ID} of the identity. * + * @property string $id The unique identifier for the identity. + * @property string $name The display name for the identity. + * * @author Qiang Xue * @version $Id$ * @package system.web.auth diff --git a/framework/web/auth/CWebUser.php b/framework/web/auth/CWebUser.php index 83c738de56..c81254f582 100644 --- a/framework/web/auth/CWebUser.php +++ b/framework/web/auth/CWebUser.php @@ -44,6 +44,13 @@ * store password or other sensitive data in the persistent storage. Instead, * you should store them directly in session on the server side if needed. * + * @property boolean $isGuest Whether the current application user is a guest. + * @property mixed $id The unique identifier for the user. If null, it means the user is a guest. + * @property string $name The user name. If the user is not logged in, this will be {@link guestName}. + * @property string $returnUrl The URL that the user should be redirected to after login. + * @property string $stateKeyPrefix A prefix for the name of the session variables storing user session data. + * @property array $flashes Flash messages (key => message). + * * @author Qiang Xue * @version $Id$ * @package system.web.auth diff --git a/framework/web/form/CForm.php b/framework/web/form/CForm.php index 32ebe6ecb1..e2f73ced28 100644 --- a/framework/web/form/CForm.php +++ b/framework/web/form/CForm.php @@ -60,6 +60,17 @@ * For more details about configuring form elements, please refer to {@link CFormInputElement} * and {@link CFormButtonElement}. * + * @property CForm $root The top-level form object. + * @property CActiveForm $activeFormWidget The active form widget associated with this form. + * This method will return the active form widget as specified by {@link activeForm}. + * @property CBaseController $owner The owner of this form. This refers to either a controller or a widget + * by which the form is created and rendered. + * @property CModel $model The model associated with this form. If this form does not have a model, + * it will look for a model in its ancestors. + * @property array $models The models that are associated with this form or its sub-forms. + * @property CFormElementCollection $elements The form elements. + * @property CFormElementCollection $buttons The form elements. + * * @author Qiang Xue * @version $Id$ * @package system.web.form diff --git a/framework/web/form/CFormButtonElement.php b/framework/web/form/CFormButtonElement.php index ed0ec8007f..22f14f3366 100644 --- a/framework/web/form/CFormButtonElement.php +++ b/framework/web/form/CFormButtonElement.php @@ -30,6 +30,8 @@ * stored in {@link attributes} which will be passed as HTML attribute values to the {@link CHtml} method * generating the button or initial values of the widget properties. * + * @property string $on Scenario names separated by commas. Defaults to null. + * * @author Qiang Xue * @version $Id$ * @package system.web.form diff --git a/framework/web/form/CFormElement.php b/framework/web/form/CFormElement.php index 061fb919d5..0bbac605d6 100644 --- a/framework/web/form/CFormElement.php +++ b/framework/web/form/CFormElement.php @@ -13,6 +13,10 @@ * * CFormElement implements the way to get and set arbitrary attributes. * + * @property boolean $visible Whether this element is visible and should be rendered. + * @property mixed $parent The direct parent of this element. This could be either a {@link CForm} object or a {@link CBaseController} object + * (a controller or a widget). + * * @author Qiang Xue * @version $Id$ * @package system.web.form diff --git a/framework/web/form/CFormInputElement.php b/framework/web/form/CFormInputElement.php index 9d7f343fd6..0d679c1efc 100644 --- a/framework/web/form/CFormInputElement.php +++ b/framework/web/form/CFormInputElement.php @@ -34,6 +34,10 @@ * stored in {@link attributes} which will be passed as HTML attribute values to the {@link CHtml} method * generating the input or initial values of the widget properties. * + * @property boolean $required Whether this input is required. + * @property string $label The label for this input. If the label is not manually set, + * this method will call {@link CModel::getAttributeLabel} to determine the label. + * * @author Qiang Xue * @version $Id$ * @package system.web.form diff --git a/framework/web/form/CFormStringElement.php b/framework/web/form/CFormStringElement.php index a3397bda38..d97c7a8f47 100644 --- a/framework/web/form/CFormStringElement.php +++ b/framework/web/form/CFormStringElement.php @@ -11,6 +11,8 @@ /** * CFormStringElement represents a string in a form. * + * @property string $on Scenario names separated by commas. Defaults to null. + * * @author Qiang Xue * @version $Id$ * @package system.web.form diff --git a/framework/web/services/CWebService.php b/framework/web/services/CWebService.php index a0a33791b4..2b0cc5db73 100644 --- a/framework/web/services/CWebService.php +++ b/framework/web/services/CWebService.php @@ -20,6 +20,8 @@ * call {@link generateWsdl} or {@link renderWsdl}. To process the web service * requests, call {@link run}. * + * @property string $methodName The currently requested method name. Empty if no method is being requested. + * * @author Qiang Xue * @version $Id$ * @package system.web.services diff --git a/framework/web/services/CWebServiceAction.php b/framework/web/services/CWebServiceAction.php index db60c44355..f9edcc11a6 100644 --- a/framework/web/services/CWebServiceAction.php +++ b/framework/web/services/CWebServiceAction.php @@ -23,6 +23,8 @@ * * Note, PHP SOAP extension is required for this action. * + * @property CWebService $service The Web service instance. + * * @author Qiang Xue * @version $Id$ * @package system.web.services diff --git a/framework/web/widgets/CFilterWidget.php b/framework/web/widgets/CFilterWidget.php index 11c5e2c850..95ad9aaf59 100644 --- a/framework/web/widgets/CFilterWidget.php +++ b/framework/web/widgets/CFilterWidget.php @@ -20,6 +20,8 @@ * * CFilterWidget provides all properties and methods of {@link CWidget} and {@link CFilter}. * + * @property boolean $isFilter Whether this widget is used as a filter. + * * @author Qiang Xue * @version $Id$ * @package system.web.widgets diff --git a/framework/web/widgets/CFlexWidget.php b/framework/web/widgets/CFlexWidget.php index 861c15d496..a4cde3461d 100644 --- a/framework/web/widgets/CFlexWidget.php +++ b/framework/web/widgets/CFlexWidget.php @@ -15,6 +15,8 @@ * (without the .swf suffix), and set {@link baseUrl} to be URL (without the ending slash) * of the directory containing the SWF file of the Flex application. * + * @property string $flashVarsAsString The flash parameter string. + * * @author Qiang Xue * @version $Id$ * @package system.web.widgets diff --git a/framework/web/widgets/CMarkdown.php b/framework/web/widgets/CMarkdown.php index cbab0f89a3..f5ae44e19e 100644 --- a/framework/web/widgets/CMarkdown.php +++ b/framework/web/widgets/CMarkdown.php @@ -22,6 +22,8 @@ *
  • {@link CMarkdownParser markdown with syntax highlighting}
  • * * + * @property CMarkdownParser $markdownParser The parser instance. + * * @author Qiang Xue * @version $Id$ * @package system.web.widgets diff --git a/framework/web/widgets/COutputCache.php b/framework/web/widgets/COutputCache.php index ab4826bc67..2502ce5e0c 100644 --- a/framework/web/widgets/COutputCache.php +++ b/framework/web/widgets/COutputCache.php @@ -57,6 +57,8 @@ * * For more advanced variation, override {@link getBaseCacheKey()} method. * + * @property boolean $isContentCached Whether the content can be found from cache. + * * @author Qiang Xue * @version $Id$ * @package system.web.widgets diff --git a/framework/web/widgets/CWidget.php b/framework/web/widgets/CWidget.php index 614e5bddcc..525df105c9 100644 --- a/framework/web/widgets/CWidget.php +++ b/framework/web/widgets/CWidget.php @@ -19,6 +19,11 @@ * * Usage is described at {@link CBaseController} and {@link CBaseController::widget}. * + * @property CBaseController $owner Owner/creator of this widget. It could be either a widget or a controller. + * @property string $id Id of the widget. + * @property CController $controller The controller that this widget belongs to. + * @property string $viewPath The directory containing the view files for this widget. + * * @author Qiang Xue * @version $Id$ * @package system.web.widgets diff --git a/framework/web/widgets/captcha/CCaptchaAction.php b/framework/web/widgets/captcha/CCaptchaAction.php index 01abaa75e2..9d2faa7349 100644 --- a/framework/web/widgets/captcha/CCaptchaAction.php +++ b/framework/web/widgets/captcha/CCaptchaAction.php @@ -28,6 +28,8 @@ *
  • In the controller view, insert a {@link CCaptcha} widget in the form.
  • * * + * @property string $verifyCode The verification code. + * * @author Qiang Xue * @version $Id$ * @package system.web.widgets.captcha diff --git a/framework/web/widgets/pagers/CBasePager.php b/framework/web/widgets/pagers/CBasePager.php index c88265470d..13835859d5 100644 --- a/framework/web/widgets/pagers/CBasePager.php +++ b/framework/web/widgets/pagers/CBasePager.php @@ -13,6 +13,12 @@ * * It provides the calculation of page count and maintains the current page. * + * @property CPagination $pages The pagination information. + * @property integer $pageSize Number of items in each page. + * @property integer $itemCount Total number of items. + * @property integer $pageCount Number of pages. + * @property integer $currentPage The zero-based index of the current page. Defaults to 0. + * * @author Qiang Xue * @version $Id$ * @package system.web.widgets.pagers diff --git a/framework/zii/widgets/grid/CGridColumn.php b/framework/zii/widgets/grid/CGridColumn.php index 751a9863ac..f6d6a73c62 100644 --- a/framework/zii/widgets/grid/CGridColumn.php +++ b/framework/zii/widgets/grid/CGridColumn.php @@ -18,6 +18,9 @@ * Child classes may override {@link renderHeaderCellContent}, {@link renderDataCellContent} * and {@link renderFooterCellContent} to customize how these cells are rendered. * + * @property boolean $hasFooter Whether this column has a footer cell. + * This is determined based on whether {@link footer} is set. + * * @author Qiang Xue * @version $Id$ * @package zii.widgets.grid diff --git a/framework/zii/widgets/grid/CGridView.php b/framework/zii/widgets/grid/CGridView.php index f39ab35dfa..9c788d3044 100644 --- a/framework/zii/widgets/grid/CGridView.php +++ b/framework/zii/widgets/grid/CGridView.php @@ -72,6 +72,10 @@ * * Please refer to {@link columns} for more details about how to configure this property. * + * @property boolean $hasFooter Whether the table should render a footer. + * This is true if any of the {@link columns} has a true {@link CGridColumn::hasFooter} value. + * @property CFormatter $formatter The formatter instance. Defaults to the 'format' application component. + * * @author Qiang Xue * @version $Id$ * @package zii.widgets.grid