Commit bdb77f33 by Carsten Brandt

updated @property annotations of many classes

parent f8701625
...@@ -28,6 +28,8 @@ use Yii; ...@@ -28,6 +28,8 @@ use Yii;
* And the parameters provided for the action are: `array('id' => 1)`. * And the parameters provided for the action are: `array('id' => 1)`.
* Then the `run()` method will be invoked as `run(1)` automatically. * Then the `run()` method will be invoked as `run(1)` automatically.
* *
* @property string $uniqueId The unique ID of this action among the whole application.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -14,6 +14,23 @@ use yii\web\HttpException; ...@@ -14,6 +14,23 @@ use yii\web\HttpException;
/** /**
* Application is the base class for all application classes. * Application is the base class for all application classes.
* *
* @property \yii\rbac\Manager $authManager The auth manager for this application.
* @property \yii\caching\Cache $cache The cache application component. Null if the component is not enabled.
* @property \yii\db\Connection $db The database connection.
* @property ErrorHandler $errorHandler The error handler application component.
* @property \yii\base\Formatter $formatter The formatter application component.
* @property \yii\i18n\I18N $i18N The internationalization component.
* @property \yii\log\Logger $log The log component.
* @property \yii\web\Request|\yii\console\Request $request The request component.
* @property string $runtimePath The directory that stores runtime files.
* Defaults to the "runtime" subdirectory under [[basePath]].
* @property string $timeZone The time zone used by this application.
* @property string $uniqueId The unique ID of the module.
* @property \yii\web\UrlManager $urlManager The URL manager for this application.
* @property string $vendorPath The directory that stores vendor files.
* Defaults to "vendor" directory under [[basePath]].
* @property View $view The view object that is used to render various view files.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -12,6 +12,12 @@ use Yii; ...@@ -12,6 +12,12 @@ use Yii;
/** /**
* Controller is the base class for classes containing controller logic. * Controller is the base class for classes containing controller logic.
* *
* @property array $actionParams The request parameters (name-value pairs) to be used for action parameter binding.
* @property string $route The route (module ID, controller ID and action ID) of the current request.
* @property string $uniqueId The controller ID that is prefixed with the module ID (if any).
* @property View $view The view object that can be used to render views or view files.
* @property string $viewPath The directory containing the view files for this controller.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
namespace yii\base; namespace yii\base;
/** /**
*
* @property boolean $isConsoleRequest The value indicating whether the current request is made via console.
* @property string $scriptFile Entry script file path (processed w/ realpath()).
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -41,7 +41,6 @@ use yii\helpers\FileHelper; ...@@ -41,7 +41,6 @@ use yii\helpers\FileHelper;
* that contains the entry script of the application. If your theme is designed to handle modules, * that contains the entry script of the application. If your theme is designed to handle modules,
* you may configure the [[pathMap]] property like described above. * you may configure the [[pathMap]] property like described above.
* *
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -21,6 +21,8 @@ use yii\widgets\FragmentCache; ...@@ -21,6 +21,8 @@ use yii\widgets\FragmentCache;
* *
* View provides a set of methods (e.g. [[render()]]) for rendering purpose. * View provides a set of methods (e.g. [[render()]]) for rendering purpose.
* *
* @property \yii\web\AssetManager $assetManager The asset manager. Defaults to the "assetManager" application component.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -12,6 +12,10 @@ use Yii; ...@@ -12,6 +12,10 @@ use Yii;
/** /**
* Widget is the base class for widgets. * Widget is the base class for widgets.
* *
* @property string $id ID of the widget.
* @property View $view The view object that can be used to render views or view files.
* @property string $viewPath The directory containing the view files for this widget.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -47,7 +47,6 @@ use yii\helpers\StringHelper; ...@@ -47,7 +47,6 @@ use yii\helpers\StringHelper;
* - [[deleteValue()]]: delete the value with the specified key from cache * - [[deleteValue()]]: delete the value with the specified key from cache
* - [[flushValues()]]: delete all values from cache * - [[flushValues()]]: delete all values from cache
* *
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -14,8 +14,6 @@ namespace yii\caching; ...@@ -14,8 +14,6 @@ namespace yii\caching;
* considered changed; When [[dependOnAll]] is false, if one of the dependencies has NOT changed, * considered changed; When [[dependOnAll]] is false, if one of the dependencies has NOT changed,
* this dependency is considered NOT changed. * this dependency is considered NOT changed.
* *
* @property boolean $hasChanged Whether the dependency is changed or not.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -13,8 +13,6 @@ namespace yii\caching; ...@@ -13,8 +13,6 @@ namespace yii\caching;
* Child classes should override its [[generateDependencyData()]] for generating * Child classes should override its [[generateDependencyData()]] for generating
* the actual dependency data. * the actual dependency data.
* *
* @property boolean $hasChanged Whether the dependency has changed.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -52,8 +52,9 @@ use yii\base\InvalidConfigException; ...@@ -52,8 +52,9 @@ use yii\base\InvalidConfigException;
* In the above, two memcache servers are used: server1 and server2. You can configure more properties of * In the above, two memcache servers are used: server1 and server2. You can configure more properties of
* each server, such as `persistent`, `weight`, `timeout`. Please see [[MemCacheServer]] for available options. * each server, such as `persistent`, `weight`, `timeout`. Please see [[MemCacheServer]] for available options.
* *
* @property \Memcache|\Memcached $memCache The memcache instance (or memcached if [[useMemcached]] is true) used by this component. * @property \Memcache|\Memcached $memcache The memcache (or memcached) object used by this cache component.
* @property MemCacheServer[] $servers List of memcache server configurations. * @property array $servers List of memcache server configurations. Each element must be an array
* with the following keys: host, port, persistent, weight, timeout, retryInterval, status.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -29,6 +29,8 @@ use yii\base\InvalidConfigException; ...@@ -29,6 +29,8 @@ use yii\base\InvalidConfigException;
* to be validated by the 'captcha' validator. * to be validated by the 'captcha' validator.
* 3. In the controller view, insert a [[Captcha]] widget in the form. * 3. In the controller view, insert a [[Captcha]] widget in the form.
* *
* @property string $verifyCode The verification code.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -18,6 +18,8 @@ use yii\validators\Validator; ...@@ -18,6 +18,8 @@ use yii\validators\Validator;
* *
* CaptchaValidator should be used together with [[CaptchaAction]]. * CaptchaValidator should be used together with [[CaptchaAction]].
* *
* @property \yii\captcha\CaptchaAction $captchaAction The action object.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -45,6 +45,8 @@ use yii\base\InvalidRouteException; ...@@ -45,6 +45,8 @@ use yii\base\InvalidRouteException;
* yii help * yii help
* ~~~ * ~~~
* *
* @property Response $response The response component.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
namespace yii\console; namespace yii\console;
/** /**
*
* @property array $params The command line arguments. It does not include the entry script name.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -28,7 +28,7 @@ use yii\console\Controller; ...@@ -28,7 +28,7 @@ use yii\console\Controller;
* Note: by default this command relies on an external tools to perform actual files compression, * Note: by default this command relies on an external tools to perform actual files compression,
* check [[jsCompressor]] and [[cssCompressor]] for more details. * check [[jsCompressor]] and [[cssCompressor]] for more details.
* *
* @property array|\yii\web\AssetManager $assetManager asset manager, which will be used for assets processing. * @property \yii\web\AssetManager $assetManager Asset manager instance.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -31,6 +31,8 @@ use yii\helpers\Inflector; ...@@ -31,6 +31,8 @@ use yii\helpers\Inflector;
* In the above, if the command name is not provided, all * In the above, if the command name is not provided, all
* available commands will be displayed. * available commands will be displayed.
* *
* @property array $commands All available command names.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -49,6 +49,12 @@ use yii\db\Connection; ...@@ -49,6 +49,12 @@ use yii\db\Connection;
* $posts = $provider->getModels(); * $posts = $provider->getModels();
* ~~~ * ~~~
* *
* @property integer $count The number of data models in the current page.
* @property array $keys The list of key values corresponding to [[models]]. Each data model in [[models]]
* is uniquely identified by the corresponding key value in this array.
* @property array $models The list of data models in the current page.
* @property integer $totalCount Total number of possible data models.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -47,6 +47,11 @@ use yii\helpers\ArrayHelper; ...@@ -47,6 +47,11 @@ use yii\helpers\ArrayHelper;
* Note: if you want to use the sorting feature, you must configure the [[sort]] property * Note: if you want to use the sorting feature, you must configure the [[sort]] property
* so that the provider knows which columns can be sorted. * so that the provider knows which columns can be sorted.
* *
* @property array $keys The list of key values corresponding to [[models]]. Each data model in [[models]]
* is uniquely identified by the corresponding key value in this array.
* @property array $models The list of data models in the current page.
* @property integer $totalCount Total number of possible data models.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -16,6 +16,10 @@ use yii\base\InvalidParamException; ...@@ -16,6 +16,10 @@ use yii\base\InvalidParamException;
* *
* It implements the [[getPagination()]] and [[getSort()]] methods as specified by the [[IDataProvider]] interface. * It implements the [[getPagination()]] and [[getSort()]] methods as specified by the [[IDataProvider]] interface.
* *
* @property integer $count The number of data models in the current page.
* @property Pagination $pagination The pagination object. If this is false, it means the pagination is disabled.
* @property Sort $sort The sorting object. If this is false, it means the sorting is disabled.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -53,12 +53,13 @@ use yii\base\Object; ...@@ -53,12 +53,13 @@ use yii\base\Object;
* )); * ));
* ~~~ * ~~~
* *
* @property integer $pageCount Number of pages.
* @property integer $page The zero-based index of the current page.
* @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 * @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. * LIMIT value for a SQL statement for fetching the current page of data.
* Note that if the page size is infinite, a value -1 will be returned.
* @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 $page The zero-based current page number.
* @property integer $pageCount Number of pages.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -65,6 +65,12 @@ use yii\helpers\Inflector; ...@@ -65,6 +65,12 @@ use yii\helpers\Inflector;
* sorted by the orders specified by the Sort object. In the view, we show two hyperlinks * sorted by the orders specified by the Sort object. In the view, we show two hyperlinks
* that can lead to pages with the data sorted by the corresponding attributes. * that can lead to pages with the data sorted by the corresponding attributes.
* *
* @property array $attributeOrders Sort directions indexed by attribute names.
* Sort direction can be either [[Sort::ASC]] for ascending order or
* [[Sort::DESC]] for descending order.
* @property array $orders The columns (keys) and their corresponding sort directions (values).
* This can be passed to [[\yii\db\Query::orderBy()]] to construct a DB query.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -44,7 +44,8 @@ use yii\caching\Cache; ...@@ -44,7 +44,8 @@ use yii\caching\Cache;
* *
* To build SELECT SQL statements, please use [[QueryBuilder]] instead. * To build SELECT SQL statements, please use [[QueryBuilder]] instead.
* *
* @property string $sql the SQL statement to be executed * @property string $rawSql The raw SQL.
* @property string $sql The SQL statement to be executed.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -39,10 +39,10 @@ use yii\base\InvalidCallException; ...@@ -39,10 +39,10 @@ use yii\base\InvalidCallException;
* [[fetchMode]]. See the [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php) * [[fetchMode]]. See the [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php)
* for more details about possible fetch mode. * for more details about possible fetch mode.
* *
* @property boolean $isClosed whether the reader is closed or not. * @property integer $columnCount The number of columns in the result set.
* @property integer $rowCount number of rows contained in the result. * @property mixed $fetchMode Fetch mode.
* @property integer $columnCount the number of columns in the result set. * @property boolean $isClosed Whether the reader is closed or not.
* @property mixed $fetchMode fetch mode used when retrieving the data. * @property integer $rowCount Number of rows contained in the result.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -19,9 +19,8 @@ use yii\caching\GroupDependency; ...@@ -19,9 +19,8 @@ use yii\caching\GroupDependency;
* *
* Schema represents the database schema information that is DBMS specific. * Schema represents the database schema information that is DBMS specific.
* *
* @property QueryBuilder $queryBuilder the query builder for the DBMS represented by this schema * @property string $lastInsertID The row ID of the last row inserted, or the last value retrieved from the sequence object.
* @property array $tableNames the names of all tables in this database. * @property QueryBuilder $queryBuilder The query builder for this connection.
* @property array $tableSchemas the schema information for all tables in this database.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -13,7 +13,7 @@ use yii\base\InvalidParamException; ...@@ -13,7 +13,7 @@ use yii\base\InvalidParamException;
/** /**
* TableSchema represents the metadata of a database table. * TableSchema represents the metadata of a database table.
* *
* @property array $columnNames list of column names * @property array $columnNames List of column names.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -29,7 +29,8 @@ use yii\base\InvalidConfigException; ...@@ -29,7 +29,8 @@ use yii\base\InvalidConfigException;
* } * }
* ~~~ * ~~~
* *
* @property boolean $isActive Whether the transaction is active. This property is read-only. * @property boolean $isActive Whether this transaction is active. Only an active transaction
* can [[commit()]] or [[rollback()]].
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -17,12 +17,14 @@ use yii\helpers\StringHelper; ...@@ -17,12 +17,14 @@ use yii\helpers\StringHelper;
/** /**
* *
*
*
* @method mixed set($key, $value) Set the string value of a key * @method mixed set($key, $value) Set the string value of a key
* @method mixed get($key) Set the string value of a key * @method mixed get($key) Set the string value of a key
* TODO document methods * TODO document methods
* *
* @property string $driverName Name of the DB driver.
* @property boolean $isActive Whether the DB connection is established.
* @property Transaction $transaction The currently active transaction. Null if no active transaction.
*
* @author Carsten Brandt <mail@cebe.cc> * @author Carsten Brandt <mail@cebe.cc>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -15,7 +15,8 @@ use yii\db\Exception; ...@@ -15,7 +15,8 @@ use yii\db\Exception;
/** /**
* Transaction represents a DB transaction. * Transaction represents a DB transaction.
* *
* @property boolean $isActive Whether the transaction is active. This property is read-only. * @property boolean $isActive Whether this transaction is active. Only an active transaction
* can [[commit()]] or [[rollBack()]].
* *
* @author Carsten Brandt <mail@cebe.cc> * @author Carsten Brandt <mail@cebe.cc>
* @since 2.0 * @since 2.0
......
...@@ -14,6 +14,11 @@ use yii\base\Component; ...@@ -14,6 +14,11 @@ use yii\base\Component;
* Panel is a base class for debugger panel classes. It defines how data should be collected, * Panel is a base class for debugger panel classes. It defines how data should be collected,
* what should be displayed at debug toolbar and on debugger details view. * what should be displayed at debug toolbar and on debugger details view.
* *
* @property string $detail Content that is displayed in debugger detail view.
* @property string $name Name of the panel.
* @property string $summary Content that is displayed at debug toolbar.
* @property string $url URL pointing to panel detail view.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -16,6 +16,9 @@ use yii\helpers\StringHelper; ...@@ -16,6 +16,9 @@ use yii\helpers\StringHelper;
/** /**
* CodeFile represents a code file to be generated. * CodeFile represents a code file to be 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> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -27,6 +27,10 @@ use yii\base\View; ...@@ -27,6 +27,10 @@ use yii\base\View;
* - [[generate()]]: generates the code based on the current user input and the specified code template files. * - [[generate()]]: generates the code based on the current user input and the specified code template files.
* This is the place where main code generation code resides. * This is the place where main code generation code resides.
* *
* @property string $description The detailed description of the generator.
* @property string $stickyDataFile The file path that stores the sticky attribute values.
* @property string $templatePath The root path of the template files that are currently being used.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -61,6 +61,12 @@ use yii\base\InvalidConfigException; ...@@ -61,6 +61,12 @@ use yii\base\InvalidConfigException;
* When the application ends or [[flushInterval]] is reached, Logger will call [[flush()]] * When the application ends or [[flushInterval]] is reached, Logger will call [[flush()]]
* to send logged messages to different log targets, such as file, email, Web. * to send logged messages to different log targets, such as file, email, Web.
* *
* @property array $dbProfiling The first element indicates the number of SQL statements executed,
* and the second element the total time spent in SQL execution.
* @property float $elapsedTime The total elapsed time in seconds for current request.
* @property array $profiling The profiling results. Each array element has the following structure:
* `array($token, $category, $time)`.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -22,7 +22,8 @@ use yii\base\InvalidConfigException; ...@@ -22,7 +22,8 @@ use yii\base\InvalidConfigException;
* satisfying both filter conditions will be handled. Additionally, you * satisfying both filter conditions will be handled. Additionally, you
* may specify [[except]] to exclude messages of certain categories. * may specify [[except]] to exclude messages of certain categories.
* *
* @property integer $levels the message levels that this target is interested in. * @property integer $levels The message levels that this target is interested in. This is a bitmap of
* level values. Defaults to 0, meaning all available levels.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -18,6 +18,8 @@ use yii\base\Object; ...@@ -18,6 +18,8 @@ use yii\base\Object;
* A user may be assigned one or several authorization items (called [[Assignment]] assignments). * A user may be assigned one or several authorization items (called [[Assignment]] assignments).
* He can perform an operation only when it is among his assigned items. * He can perform an operation only when it is among his assigned items.
* *
* @property string $name The item name.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @author Alexander Kochetov <creocoder@gmail.com> * @author Alexander Kochetov <creocoder@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -13,6 +13,8 @@ use yii\web\UploadedFile; ...@@ -13,6 +13,8 @@ use yii\web\UploadedFile;
/** /**
* FileValidator verifies if an attribute is receiving a valid uploaded file. * FileValidator verifies if an attribute is receiving a valid uploaded file.
* *
* @property integer $sizeLimit The size limit for uploaded files.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -13,6 +13,13 @@ use yii\base\InvalidRouteException; ...@@ -13,6 +13,13 @@ use yii\base\InvalidRouteException;
/** /**
* Application is the base class for all application classes. * Application is the base class for all application classes.
* *
* @property AssetManager $assetManager The asset manager component.
* @property string $homeUrl The homepage URL.
* @property Request $request The request component.
* @property Response $response The response component.
* @property Session $session The session component.
* @property User $user The user component.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -16,6 +16,8 @@ use yii\helpers\FileHelper; ...@@ -16,6 +16,8 @@ use yii\helpers\FileHelper;
/** /**
* AssetManager manages asset bundles and asset publishing. * AssetManager manages asset bundles and asset publishing.
* *
* @property IAssetConverter $converter The asset converter.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -21,6 +21,8 @@ use yii\base\InvalidConfigException; ...@@ -21,6 +21,8 @@ use yii\base\InvalidConfigException;
* may be swapped out and get lost. Therefore, you must make sure the cache used by this component * may be swapped out and get lost. Therefore, you must make sure the cache used by this component
* is NOT volatile. If you want to use database as storage medium, use [[DbSession]] is a better choice. * is NOT volatile. If you want to use database as storage medium, use [[DbSession]] is a better choice.
* *
* @property boolean $useCustomStorage Whether to use custom storage.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -14,7 +14,6 @@ use yii\helpers\Html; ...@@ -14,7 +14,6 @@ use yii\helpers\Html;
/** /**
* Controller is the base class of Web controllers. * Controller is the base class of Web controllers.
* *
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -15,7 +15,8 @@ use yii\base\Object; ...@@ -15,7 +15,8 @@ use yii\base\Object;
/** /**
* CookieCollection maintains the cookies available in the current request. * CookieCollection maintains the cookies available in the current request.
* *
* @property integer $count the number of cookies in the collection * @property integer $count The number of cookies in the collection.
* @property ArrayIterator $iterator An iterator for traversing the cookies in the collection.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -28,6 +28,8 @@ use yii\base\InvalidConfigException; ...@@ -28,6 +28,8 @@ use yii\base\InvalidConfigException;
* ) * )
* ~~~ * ~~~
* *
* @property boolean $useCustomStorage Whether to use custom storage.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -14,6 +14,9 @@ use ArrayIterator; ...@@ -14,6 +14,9 @@ use ArrayIterator;
/** /**
* HeaderCollection is used by [[Response]] to maintain the currently registered HTTP headers. * HeaderCollection is used by [[Response]] to maintain the currently registered HTTP headers.
* *
* @property integer $count The number of headers in the collection.
* @property ArrayIterator $iterator An iterator for traversing the headers in the collection.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -12,6 +12,47 @@ use yii\base\InvalidConfigException; ...@@ -12,6 +12,47 @@ use yii\base\InvalidConfigException;
use yii\helpers\Security; use yii\helpers\Security;
/** /**
*
* @property string $absoluteUrl The currently requested absolute URL.
* @property string $acceptTypes User browser accept types, null if not present.
* @property array $acceptedContentTypes The content types ordered by the preference level. The first element
* represents the most preferred content type.
* @property array $acceptedLanguages The languages ordered by the preference level. The first element
* represents the most preferred language.
* @property string $baseUrl The relative URL for the application.
* @property string $cookieValidationKey The secret key used for cookie validation. If it was not set previously,
* a random key will be generated and used.
* @property CookieCollection $cookies The cookie collection.
* @property string $csrfToken The random token for CSRF validation.
* @property string $hostInfo Schema and hostname part (with port number if needed) of the request URL (e.g. `http://www.yiiframework.com`).
* @property boolean $isAjax Whether this is an AJAX (XMLHttpRequest) request.
* @property boolean $isDelete Whether this is a DELETE request.
* @property boolean $isFlash Whether this is an Adobe Flash or Adobe Flex request.
* @property boolean $isPatch Whether this is a PATCH request.
* @property boolean $isPost Whether this is a POST request.
* @property boolean $isPut Whether this is a PUT request.
* @property boolean $isSecureConnection If the request is sent via secure channel (https).
* @property string $method Request method, such as GET, POST, HEAD, PUT, PATCH, DELETE.
* The value returned is turned into upper case.
* @property string $pathInfo Part of the request URL that is after the entry script and before the question mark.
* Note, the returned path info is already URL-decoded.
* @property integer $port Port number for insecure requests.
* @property string $preferredLanguage The language that the application should use. Null is returned if both [[getAcceptedLanguages()]]
* and `$languages` are empty.
* @property string $queryString Part of the request URL that is after the question mark.
* @property string $rawBody The request body.
* @property string $referrer URL referrer, null if not present.
* @property array $restParams The RESTful request parameters.
* @property string $scriptFile The entry script file path.
* @property string $scriptUrl The relative URL of the entry script.
* @property integer $securePort Port number for secure requests.
* @property string $serverName Server name.
* @property integer $serverPort Server port number.
* @property string $url The currently requested relative URL. Note that the URI returned is URL-encoded.
* @property string $userAgent User agent, null if not present.
* @property string $userHost User host name, null if cannot be determined.
* @property string $userIP User IP address.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -17,6 +17,21 @@ use yii\helpers\Security; ...@@ -17,6 +17,21 @@ use yii\helpers\Security;
use yii\helpers\StringHelper; use yii\helpers\StringHelper;
/** /**
*
* @property CookieCollection $cookies The cookie collection.
* @property HeaderCollection $headers The header collection.
* @property boolean $isClientError Whether this response indicates a client error.
* @property boolean $isEmpty Whether this response is empty.
* @property boolean $isForbidden Whether this response indicates the current request is forbidden.
* @property boolean $isInformational Whether this response is informational.
* @property boolean $isInvalid Whether this response has a valid [[statusCode]].
* @property boolean $isNotFound Whether this response indicates the currently requested resource is not found.
* @property boolean $isOk Whether this response is OK.
* @property boolean $isRedirection Whether this response is a redirection.
* @property boolean $isServerError Whether this response indicates a server error.
* @property boolean $isSuccessful Whether this response is successful.
* @property integer $statusCode The HTTP status code to send with the response.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @author Carsten Brandt <mail@cebe.cc> * @author Carsten Brandt <mail@cebe.cc>
* @since 2.0 * @since 2.0
......
...@@ -45,18 +45,23 @@ use yii\base\InvalidParamException; ...@@ -45,18 +45,23 @@ use yii\base\InvalidParamException;
* useful for displaying confirmation messages. To use flash messages, simply * useful for displaying confirmation messages. To use flash messages, simply
* call methods such as [[setFlash()]], [[getFlash()]]. * call methods such as [[setFlash()]], [[getFlash()]].
* *
* @property array $allFlashes Flash messages (key => message).
* @property array $cookieParams The session cookie parameters.
* @property integer $count The number of session variables.
* @property string $flash The key identifying the flash message. Note that flash messages
* and normal session variables share the same name space. If you have a normal
* session variable using the same name, its value will be overwritten by this method.
* @property float $gCProbability The probability (percentage) that the GC (garbage collection) process is started on every session initialization, defaults to 1 meaning 1% chance.
* @property string $id The current session ID. * @property string $id The current session ID.
* @property boolean $isActive Whether the session has started.
* @property SessionIterator $iterator An iterator for traversing the session variables.
* @property string $name The current session name. * @property string $name The current session name.
* @property boolean $isActive Whether the session has started * @property string $savePath The current session save path, defaults to '/tmp'.
* @property string $savePath The current session save path, defaults to {@link http://php.net/manual/en/session.configuration.php#ini.session.save-path}. * @property integer $timeout The number of seconds after which data will be seen as 'garbage' and cleaned up.
* @property array $cookieParams The session cookie parameters. * The default value is 1440 seconds (or the value of "session.gc_maxlifetime" set in php.ini).
* @property boolean $useCookies Whether cookies should be used to store session IDs. * @property boolean|null $useCookies The value indicating whether cookies should be used to store session IDs.
* @property float $gCProbability The probability (percentage) that the gc (garbage collection) process is started on every session initialization, defaults to 1 meaning 1% chance. * @property boolean $useCustomStorage Whether to use custom storage.
* @property boolean $useTransparentSessionID Whether transparent sid support is enabled or not, defaults to false. * @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 SessionIterator $iterator An iterator for traversing the session variables.
* @property integer $count The number of session variables.
* @property array $allFlashes The list of all flash messages.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
......
...@@ -10,6 +10,19 @@ namespace yii\web; ...@@ -10,6 +10,19 @@ namespace yii\web;
use yii\helpers\Html; use yii\helpers\Html;
/** /**
*
* @property integer $error The error code.
* @property boolean $hasError Whether there is an error with the uploaded file.
* Check [[error]] for detailed error code information.
* @property string $name The original name of the file being uploaded.
* @property integer $size The actual size of the uploaded file in bytes.
* @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 [[FileHelper::getMimeType()]] to determine the exact MIME type.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -14,6 +14,9 @@ use yii\caching\Cache; ...@@ -14,6 +14,9 @@ use yii\caching\Cache;
/** /**
* UrlManager handles HTTP request parsing and creation of URLs based on a set of rules. * UrlManager handles HTTP request parsing and creation of URLs based on a set of rules.
* *
* @property string $baseUrl The base URL that is used by [[createUrl()]] to prepend URLs it creates.
* @property string $hostInfo The host info (e.g. "http://www.example.com") that is used by [[createAbsoluteUrl()]] to prepend URLs it creates.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -20,6 +20,12 @@ use yii\base\InvalidConfigException; ...@@ -20,6 +20,12 @@ use yii\base\InvalidConfigException;
* User works with a class implementing the [[Identity]] interface. This class implements * User works with a class implementing the [[Identity]] interface. This class implements
* the actual user authentication logic and is often backed by a user database table. * the actual user authentication logic and is often backed by a user database table.
* *
* @property string|integer $id The unique identifier for the user. If null, it means the user is a guest.
* @property Identity $identity The identity object associated with the currently logged user.
* Null is returned if the user is not logged in (not authenticated).
* @property boolean $isGuest Whether the current user is a guest.
* @property string $returnUrl The URL that the user should be redirected to after login.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
...@@ -13,6 +13,9 @@ use yii\caching\Cache; ...@@ -13,6 +13,9 @@ use yii\caching\Cache;
use yii\caching\Dependency; use yii\caching\Dependency;
/** /**
*
* @property string|boolean $cachedContent The cached content. False is returned if valid content is not found in the cache.
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment