Permalink
Browse files

Documented component accessors with @property for significantly bette…

…r IDE autocomplete
  • Loading branch information...
1 parent fe3a175 commit 646cbb2b9a7a5e55733fbb115c7a520df3c0ed46 alexander.makarow committed Oct 25, 2011
Showing with 473 additions and 74 deletions.
  1. +26 −22 framework/base/CApplication.php
  2. +2 −0 framework/base/CApplicationComponent.php
  3. +19 −8 framework/base/CModule.php
  4. +6 −0 framework/base/CSecurityManager.php
  5. +4 −0 framework/caching/CDbCache.php
  6. +3 −0 framework/caching/CFileCache.php
  7. +3 −0 framework/caching/CMemCache.php
  8. +4 −0 framework/caching/dependencies/CCacheDependency.php
  9. +3 −0 framework/caching/dependencies/CChainedCacheDependency.php
  10. +2 −0 framework/cli/commands/ShellCommand.php
  11. +2 −0 framework/cli/commands/shell/HelpCommand.php
  12. +3 −0 framework/console/CConsoleApplication.php
  13. +6 −0 framework/console/CConsoleCommand.php
  14. +2 −0 framework/console/CConsoleCommandRunner.php
  15. +2 −0 framework/console/CHelpCommand.php
  16. +19 −0 framework/db/CDbCommand.php
  17. +21 −0 framework/db/CDbConnection.php
  18. +5 −0 framework/db/CDbDataReader.php
  19. +2 −0 framework/db/CDbMigration.php
  20. +3 −0 framework/db/CDbTransaction.php
  21. +3 −0 framework/db/schema/CDbCommandBuilder.php
  22. +7 −0 framework/db/schema/CDbSchema.php
  23. +2 −0 framework/db/schema/CDbTableSchema.php
  24. +2 −0 framework/db/schema/oci/COciSchema.php
  25. +3 −0 framework/gii/CCodeFile.php
  26. +3 −0 framework/gii/CCodeGenerator.php
  27. +4 −0 framework/gii/CCodeModel.php
  28. +2 −0 framework/gii/GiiModule.php
  29. +2 −0 framework/i18n/CDbMessageSource.php
  30. +17 −0 framework/i18n/CLocale.php
  31. +3 −0 framework/i18n/CMessageSource.php
  32. +5 −0 framework/logging/CEmailLogRoute.php
  33. +5 −0 framework/logging/CFileLogRoute.php
  34. +2 −0 framework/logging/CLogRouter.php
  35. +11 −0 framework/logging/CLogger.php
  36. +2 −0 framework/logging/CProfileLogRoute.php
  37. +3 −0 framework/test/CDbFixtureManager.php
  38. +2 −0 framework/test/CDbTestCase.php
  39. +2 −0 framework/test/CWebTestCase.php
  40. +2 −0 framework/utils/CFormatter.php
  41. +2 −0 framework/utils/CMarkdownParser.php
  42. +3 −0 framework/web/CActiveDataProvider.php
  43. +4 −0 framework/web/CAssetManager.php
  44. +2 −0 framework/web/CCacheHttpSession.php
  45. +2 −0 framework/web/CClientScript.php
  46. +12 −0 framework/web/CController.php
  47. +9 −0 framework/web/CDataProvider.php
  48. +2 −0 framework/web/CDbHttpSession.php
  49. +2 −0 framework/web/CExtController.php
  50. +31 −28 framework/web/CHttpRequest.php
  51. +14 −0 framework/web/CHttpSession.php
  52. +10 −0 framework/web/CPagination.php
  53. +6 −0 framework/web/CSort.php
  54. +7 −0 framework/web/CTheme.php
  55. +4 −0 framework/web/CThemeManager.php
  56. +15 −0 framework/web/CUploadedFile.php
  57. +6 −0 framework/web/CUrlManager.php
  58. +15 −16 framework/web/CWebApplication.php
  59. +7 −0 framework/web/CWebModule.php
  60. +3 −0 framework/web/actions/CAction.php
  61. +3 −0 framework/web/actions/CViewAction.php
  62. +2 −0 framework/web/auth/CAccessControlFilter.php
  63. +5 −0 framework/web/auth/CAuthAssignment.php
  64. +8 −0 framework/web/auth/CAuthItem.php
  65. +4 −0 framework/web/auth/CAuthManager.php
  66. +7 −0 framework/web/auth/CBaseUserIdentity.php
  67. +2 −0 framework/web/auth/CDbAuthManager.php
  68. +2 −0 framework/web/auth/CPhpAuthManager.php
  69. +3 −0 framework/web/auth/CUserIdentity.php
  70. +7 −0 framework/web/auth/CWebUser.php
  71. +11 −0 framework/web/form/CForm.php
  72. +2 −0 framework/web/form/CFormButtonElement.php
  73. +4 −0 framework/web/form/CFormElement.php
  74. +4 −0 framework/web/form/CFormInputElement.php
  75. +2 −0 framework/web/form/CFormStringElement.php
  76. +2 −0 framework/web/services/CWebService.php
  77. +2 −0 framework/web/services/CWebServiceAction.php
  78. +2 −0 framework/web/widgets/CFilterWidget.php
  79. +2 −0 framework/web/widgets/CFlexWidget.php
  80. +2 −0 framework/web/widgets/CMarkdown.php
  81. +2 −0 framework/web/widgets/COutputCache.php
  82. +5 −0 framework/web/widgets/CWidget.php
  83. +2 −0 framework/web/widgets/captcha/CCaptchaAction.php
  84. +6 −0 framework/web/widgets/pagers/CBasePager.php
  85. +3 −0 framework/zii/widgets/grid/CGridColumn.php
  86. +4 −0 framework/zii/widgets/grid/CGridView.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 <qiang.xue@gmail.com>
* @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
{
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.base
View
@@ -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,
+ * <pre>
+ * array(
+ * 'models'=>'application.models', // an existing alias
+ * 'extensions'=>'application.extensions', // an existing alias
+ * 'backend'=>dirname(__FILE__).'/../backend', // a directory
+ * )
+ * </pre>.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @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
{
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.base
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.caching
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.caching
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.caching
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.caching.dependencies
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.caching.dependencies
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.cli.commands
@@ -12,6 +12,8 @@
/**
* HelpCommand displays help information for commands under yiic shell.
*
+ * @property string $help The command description.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
* @package system.cli.commands.shell
@@ -36,6 +36,9 @@
* php path/to/entry_script.php help <command name>
* </pre>
*
+ * @property string $commandPath The directory that contains the command classes. Defaults to 'protected/commands'.
+ * @property CConsoleCommandRunner $commandRunner The command runner.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
* @package system.console
@@ -34,6 +34,12 @@
* }
* </pre>
*
+ * @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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.console
@@ -11,6 +11,8 @@
/**
* CConsoleCommandRunner manages commands and executes the requested command.
*
+ * @property string $scriptName The entry script name.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
* @package system.console
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.console
@@ -38,6 +38,25 @@
* ->queryRow();
* </pre>
*
+ * @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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.db
@@ -78,6 +78,27 @@
* )
* </pre>
*
+ * @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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.db
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.db
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.db
@@ -29,6 +29,9 @@
* }
* </pre>
*
+ * @property CDbConnection $connection The DB connection for this transaction.
+ * @property boolean $active Whether this transaction is active.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
* @package system.db
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.db.schema
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.db.schema
@@ -23,6 +23,8 @@
* <li>{@link sequenceName}</li>
* </ul>
*
+ * @property array $columnNames List of column names.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
* @package system.db.schema
@@ -11,6 +11,8 @@
/**
* COciSchema is the class for retrieving metadata information from an Oracle database.
*
+ * @property string $defaultSchema Default schema.
+ *
* @author Ricardo Grana <rickgrana@yahoo.com.br>
* @version $Id$
* @package system.db.schema.oci
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.gii
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.gii
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.gii
@@ -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 <qiang.xue@gmail.com>
* @version $Id$
* @package system.gii
Oops, something went wrong.

0 comments on commit 646cbb2

Please sign in to comment.