Commit 0b29c960 by Qiang Xue

fixed broken API links [skip ci]

parent eeb9f602
...@@ -63,7 +63,7 @@ class BaseDoc extends Object ...@@ -63,7 +63,7 @@ class BaseDoc extends Object
$docblock = $reflector->getDocBlock(); $docblock = $reflector->getDocBlock();
if ($docblock !== null) { if ($docblock !== null) {
$this->shortDescription = ucfirst($docblock->getShortDescription()); $this->shortDescription = ucfirst($docblock->getShortDescription());
if (empty($this->shortDescription) && !($this instanceof PropertyDoc) && $context !== null) { if (empty($this->shortDescription) && !($this instanceof PropertyDoc) && $context !== null && $docblock->getTagsByName('inheritdoc') === null) {
$context->errors[] = [ $context->errors[] = [
'line' => $this->startLine, 'line' => $this->startLine,
'file' => $this->sourceFile, 'file' => $this->sourceFile,
......
...@@ -83,7 +83,7 @@ class Context extends Component ...@@ -83,7 +83,7 @@ class Context extends Component
} }
// update interfaces of subclasses // update interfaces of subclasses
foreach ($this->classes as $class) { foreach ($this->classes as $class) {
$this->updateSubclassInferfacesTraits($class); $this->updateSubclassInterfacesTraits($class);
} }
// update implementedBy and usedBy for interfaces and traits // update implementedBy and usedBy for interfaces and traits
foreach ($this->classes as $class) { foreach ($this->classes as $class) {
...@@ -129,13 +129,13 @@ class Context extends Component ...@@ -129,13 +129,13 @@ class Context extends Component
* Add implemented interfaces and used traits to subclasses * Add implemented interfaces and used traits to subclasses
* @param ClassDoc $class * @param ClassDoc $class
*/ */
protected function updateSubclassInferfacesTraits($class) protected function updateSubclassInterfacesTraits($class)
{ {
foreach ($class->subclasses as $subclass) { foreach ($class->subclasses as $subclass) {
$subclass = $this->classes[$subclass]; $subclass = $this->classes[$subclass];
$subclass->interfaces = array_unique(array_merge($subclass->interfaces, $class->interfaces)); $subclass->interfaces = array_unique(array_merge($subclass->interfaces, $class->interfaces));
$subclass->traits = array_unique(array_merge($subclass->traits, $class->traits)); $subclass->traits = array_unique(array_merge($subclass->traits, $class->traits));
$this->updateSubclassInferfacesTraits($subclass); $this->updateSubclassInterfacesTraits($subclass);
} }
} }
......
...@@ -63,7 +63,11 @@ class PropertyDoc extends BaseDoc ...@@ -63,7 +63,11 @@ class PropertyDoc extends BaseDoc
$this->defaultValue = PrettyPrinter::getRepresentationOfValue($reflector->getNode()->default); $this->defaultValue = PrettyPrinter::getRepresentationOfValue($reflector->getNode()->default);
} }
$hasInheritdoc = false;
foreach ($this->tags as $tag) { foreach ($this->tags as $tag) {
if ($tag->getName() === 'inheritdoc') {
$hasInheritdoc = true;
}
if ($tag instanceof VarTag) { if ($tag instanceof VarTag) {
$this->type = $tag->getType(); $this->type = $tag->getType();
$this->types = $tag->getTypes(); $this->types = $tag->getTypes();
...@@ -75,7 +79,7 @@ class PropertyDoc extends BaseDoc ...@@ -75,7 +79,7 @@ class PropertyDoc extends BaseDoc
} }
} }
} }
if (empty($this->shortDescription) && $context !== null) { if (empty($this->shortDescription) && $context !== null && !$hasInheritdoc) {
$context->errors[] = [ $context->errors[] = [
'line' => $this->startLine, 'line' => $this->startLine,
'file' => $this->sourceFile, 'file' => $this->sourceFile,
......
...@@ -46,7 +46,7 @@ use Yii; ...@@ -46,7 +46,7 @@ use Yii;
* This action handles the redirection and closing of popup window correctly. * This action handles the redirection and closing of popup window correctly.
* *
* @see Collection * @see Collection
* @see \yii\authclient\widgets\Choice * @see \yii\authclient\widgets\AuthChoice
* *
* @property string $cancelUrl Cancel URL. * @property string $cancelUrl Cancel URL.
* @property string $successUrl Successful URL. * @property string $successUrl Successful URL.
......
...@@ -74,10 +74,10 @@ class SiteController extends Controller ...@@ -74,10 +74,10 @@ class SiteController extends Controller
} }
``` ```
You may use [[yii\authclient\widgets\Choice]] to compose auth client selection: You may use [[yii\authclient\widgets\AuthChoice]] to compose auth client selection:
``` ```
<?= yii\authclient\widgets\Choice::widget([ <?= yii\authclient\widgets\AuthChoice::widget([
'baseAuthUrl' => ['site/auth'] 'baseAuthUrl' => ['site/auth']
]) ?> ]) ?>
``` ```
...@@ -119,7 +119,7 @@ Defining list of attributes, which external auth provider should return, depends ...@@ -119,7 +119,7 @@ Defining list of attributes, which external auth provider should return, depends
Each auth client has "viewOptions" attribute. It is an array, which stores name-value pairs, Each auth client has "viewOptions" attribute. It is an array, which stores name-value pairs,
which serve to compose client representation in the view. which serve to compose client representation in the view.
For example widget [[yii\authclient\widgets\Choice]] uses keys "popupWidth" and "popupHeight" to For example widget [[yii\authclient\widgets\AuthChoice]] uses keys "popupWidth" and "popupHeight" to
determine the size of authentication popup window. determine the size of authentication popup window.
......
...@@ -83,7 +83,7 @@ class AuthChoice extends Widget ...@@ -83,7 +83,7 @@ class AuthChoice extends Widget
public $popupMode = true; public $popupMode = true;
/** /**
* @var boolean indicates if widget content, should be rendered automatically. * @var boolean indicates if widget content, should be rendered automatically.
* Note: this value automatically set to 'false' at the first call of [[createProviderUrl()]] * Note: this value automatically set to 'false' at the first call of [[createClientUrl()]]
*/ */
public $autoRender = true; public $autoRender = true;
......
...@@ -72,7 +72,7 @@ class ButtonGroup extends Widget ...@@ -72,7 +72,7 @@ class ButtonGroup extends Widget
} }
/** /**
* Generates the buttons that compound the group as specified on [[items]]. * Generates the buttons that compound the group as specified on [[buttons]].
* @return string the rendering result. * @return string the rendering result.
*/ */
protected function renderButtons() protected function renderButtons()
......
...@@ -100,7 +100,7 @@ class LogTarget extends Target ...@@ -100,7 +100,7 @@ class LogTarget extends Target
* Processes the given log messages. * Processes the given log messages.
* This method will filter the given messages with [[levels]] and [[categories]]. * This method will filter the given messages with [[levels]] and [[categories]].
* And if requested, it will also export the filtering result to specific medium (e.g. email). * And if requested, it will also export the filtering result to specific medium (e.g. email).
* @param array $messages log messages to be processed. See [[Logger::messages]] for the structure * @param array $messages log messages to be processed. See [[\yii\log\Logger::messages]] for the structure
* of each message. * of each message.
* @param boolean $final whether this method is called at the end of the current application * @param boolean $final whether this method is called at the end of the current application
*/ */
......
...@@ -50,7 +50,7 @@ class CodeFile extends Object ...@@ -50,7 +50,7 @@ class CodeFile extends Object
*/ */
public $content; public $content;
/** /**
* @var string the operation to be performed. This can be [[OP_NEW]], [[OP_OVERWRITE]] or [[OP_SKIP]]. * @var string the operation to be performed. This can be [[OP_CREATE]], [[OP_OVERWRITE]] or [[OP_SKIP]].
*/ */
public $operation; public $operation;
......
...@@ -32,8 +32,8 @@ use yii\web\ForbiddenHttpException; ...@@ -32,8 +32,8 @@ use yii\web\ForbiddenHttpException;
* With the above configuration, you will be able to access GiiModule in your browser using * With the above configuration, you will be able to access GiiModule in your browser using
* the URL `http://localhost/path/to/index.php?r=gii` * the URL `http://localhost/path/to/index.php?r=gii`
* *
* If your application enables [[UrlManager::enablePrettyUrl|pretty URLs]] and you have defined * If your application enables [[\yii\web\UrlManager::enablePrettyUrl|pretty URLs]] and you have defined
* custom URL rules or enabled [[UrlManager::enableStrictParsing], you may need to add * custom URL rules or enabled [[\yii\web\UrlManager::enableStrictParsing], you may need to add
* the following URL rules at the beginning of your URL rule set in your application configuration * the following URL rules at the beginning of your URL rule set in your application configuration
* in order to access Gii: * in order to access Gii:
* *
......
...@@ -136,7 +136,7 @@ class BaseImage ...@@ -136,7 +136,7 @@ class BaseImage
} }
/** /**
* Creates a thumbnail image. The function differs from [[\Imagine\Image\ImageInterface::thumbnail()]] function that * Creates a thumbnail image. The function differs from `\Imagine\Image\ImageInterface::thumbnail()` function that
* it keeps the aspect ratio of the image. * it keeps the aspect ratio of the image.
* @param string $filename the image file path or path alias. * @param string $filename the image file path or path alias.
* @param integer $width the width in pixels to create the thumbnail * @param integer $width the width in pixels to create the thumbnail
......
...@@ -103,7 +103,7 @@ class ActiveRecord extends BaseActiveRecord ...@@ -103,7 +103,7 @@ class ActiveRecord extends BaseActiveRecord
$db = static::getDb(); $db = static::getDb();
$values = $this->getDirtyAttributes($attributes); $values = $this->getDirtyAttributes($attributes);
$pk = []; $pk = [];
// if ($values === []) { // if ($values === []) {
foreach ($this->primaryKey() as $key) { foreach ($this->primaryKey() as $key) {
$pk[$key] = $values[$key] = $this->getAttribute($key); $pk[$key] = $values[$key] = $this->getAttribute($key);
if ($pk[$key] === null) { if ($pk[$key] === null) {
...@@ -111,7 +111,7 @@ class ActiveRecord extends BaseActiveRecord ...@@ -111,7 +111,7 @@ class ActiveRecord extends BaseActiveRecord
$this->setAttribute($key, $values[$key]); $this->setAttribute($key, $values[$key]);
} }
} }
// } // }
// save pk in a findall pool // save pk in a findall pool
$db->executeCommand('RPUSH', [static::keyPrefix(), static::buildKey($pk)]); $db->executeCommand('RPUSH', [static::keyPrefix(), static::buildKey($pk)]);
......
...@@ -128,9 +128,9 @@ Using the redis ActiveRecord ...@@ -128,9 +128,9 @@ Using the redis ActiveRecord
For general information on how to use yii's ActiveRecord please refer to the [guide](https://github.com/yiisoft/yii2/blob/master/docs/guide/active-record.md). For general information on how to use yii's ActiveRecord please refer to the [guide](https://github.com/yiisoft/yii2/blob/master/docs/guide/active-record.md).
For defining a redis ActiveRecord class your record class needs to extend from `yii\redis\ActiveRecord` and For defining a redis ActiveRecord class your record class needs to extend from [[yii\redis\ActiveRecord]] and
implement at least the `attributes()` method to define the attributes of the record. implement at least the `attributes()` method to define the attributes of the record.
A primary key can be defined via [[primaryKey()]] which defaults to `id` if not specified. A primary key can be defined via [[yii\redis\ActiveRecord::primaryKey()]] which defaults to `id` if not specified.
The primaryKey needs to be part of the attributes so make sure you have an `id` attribute defined if you do The primaryKey needs to be part of the attributes so make sure you have an `id` attribute defined if you do
not specify your own primary key. not specify your own primary key.
......
...@@ -34,7 +34,6 @@ use yii\validators\Validator; ...@@ -34,7 +34,6 @@ use yii\validators\Validator;
* - [[EVENT_AFTER_VALIDATE]]: an event raised at the end of [[validate()]] * - [[EVENT_AFTER_VALIDATE]]: an event raised at the end of [[validate()]]
* *
* You may directly use Model to store model data, or extend it with customization. * You may directly use Model to store model data, or extend it with customization.
* You may also customize Model by attaching [[ModelBehavior|model behaviors]].
* *
* @property \yii\validators\Validator[] $activeValidators The validators applicable to the current * @property \yii\validators\Validator[] $activeValidators The validators applicable to the current
* [[scenario]]. This property is read-only. * [[scenario]]. This property is read-only.
...@@ -229,7 +228,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab ...@@ -229,7 +228,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/** /**
* Returns the form name that this model class should use. * Returns the form name that this model class should use.
* *
* The form name is mainly used by [[\yii\web\ActiveForm]] to determine how to name * The form name is mainly used by [[\yii\widgets\ActiveForm]] to determine how to name
* the input fields for the attributes in a model. If the form name is "A" and an attribute * the input fields for the attributes in a model. If the form name is "A" and an attribute
* name is "b", then the corresponding input name would be "A[b]". If the form name is * name is "b", then the corresponding input name would be "A[b]". If the form name is
* an empty string, then the input name would be "b". * an empty string, then the input name would be "b".
......
...@@ -93,7 +93,7 @@ class Module extends ServiceLocator ...@@ -93,7 +93,7 @@ class Module extends ServiceLocator
*/ */
public $controllerNamespace; public $controllerNamespace;
/** /**
* @return string the default route of this module. Defaults to 'default'. * @var string the default route of this module. Defaults to 'default'.
* The route may consist of child module ID, controller ID, and/or action ID. * The route may consist of child module ID, controller ID, and/or action ID.
* For example, `help`, `post/create`, `admin/post/create`. * For example, `help`, `post/create`, `admin/post/create`.
* If action ID is not given, it will take the default value as specified in * If action ID is not given, it will take the default value as specified in
......
...@@ -126,14 +126,13 @@ class View extends Component ...@@ -126,14 +126,13 @@ class View extends Component
* - absolute path within application (e.g. "//site/index"): the view name starts with double slashes. * - absolute path within application (e.g. "//site/index"): the view name starts with double slashes.
* The actual view file will be looked for under the [[Application::viewPath|view path]] of the application. * The actual view file will be looked for under the [[Application::viewPath|view path]] of the application.
* - absolute path within current module (e.g. "/site/index"): the view name starts with a single slash. * - absolute path within current module (e.g. "/site/index"): the view name starts with a single slash.
* The actual view file will be looked for under the [[Module::viewPath|view path]] of [[module]]. * The actual view file will be looked for under the [[Module::viewPath|view path]] of the [[Controller::module|current module]].
* - relative view (e.g. "index"): the view name does not start with `@` or `/`. The corresponding view file will be * - relative view (e.g. "index"): the view name does not start with `@` or `/`. The corresponding view file will be
* looked for under the [[ViewContextInterface::getViewPath()|view path]] of the view `$context`. * looked for under the [[ViewContextInterface::getViewPath()|view path]] of the view `$context`.
* If `$context` is not given, it will be looked for under the directory containing the view currently * If `$context` is not given, it will be looked for under the directory containing the view currently
* being rendered (i.e., this happens when rendering a view within another view). * being rendered (i.e., this happens when rendering a view within another view).
* *
* @param string $view the view name. Please refer to [[Controller::findViewFile()]] * @param string $view the view name.
* and [[Widget::findViewFile()]] on how to specify this parameter.
* @param array $params the parameters (name-value pairs) that will be extracted and made available in the view file. * @param array $params the parameters (name-value pairs) that will be extracted and made available in the view file.
* @param object $context the context to be assigned to the view and can later be accessed via [[context]] * @param object $context the context to be assigned to the view and can later be accessed via [[context]]
* in the view. If the context implements [[ViewContextInterface]], it may also be used to locate * in the view. If the context implements [[ViewContextInterface]], it may also be used to locate
...@@ -201,7 +200,7 @@ class View extends Component ...@@ -201,7 +200,7 @@ class View extends Component
* *
* The method will call [[FileHelper::localize()]] to localize the view file. * The method will call [[FileHelper::localize()]] to localize the view file.
* *
* If [[renderer]] is enabled (not null), the method will use it to render the view file. * If [[renderers|renderer]] is enabled (not null), the method will use it to render the view file.
* Otherwise, it will simply include the view file as a normal PHP file, capture its output and * Otherwise, it will simply include the view file as a normal PHP file, capture its output and
* return it as a string. * return it as a string.
* *
......
...@@ -257,8 +257,8 @@ interface ActiveRecordInterface ...@@ -257,8 +257,8 @@ interface ActiveRecordInterface
/** /**
* Saves the current record. * Saves the current record.
* *
* This method will call [[insert()]] when [[getIsNewRecord|isNewRecord]] is true, or [[update()]] * This method will call [[insert()]] when [[getIsNewRecord()|isNewRecord]] is true, or [[update()]]
* when [[getIsNewRecord|isNewRecord]] is false. * when [[getIsNewRecord()|isNewRecord]] is false.
* *
* For example, to save a customer record: * For example, to save a customer record:
* *
...@@ -337,7 +337,7 @@ interface ActiveRecordInterface ...@@ -337,7 +337,7 @@ interface ActiveRecordInterface
/** /**
* Returns a value indicating whether the given active record is the same as the current one. * Returns a value indicating whether the given active record is the same as the current one.
* Two [[isNewRecord|new]] records are considered to be not equal. * Two [[getIsNewRecord()|new]] records are considered to be not equal.
* @param static $record record to compare to * @param static $record record to compare to
* @return boolean whether the two active records refer to the same row in the same database table. * @return boolean whether the two active records refer to the same row in the same database table.
*/ */
......
...@@ -22,8 +22,8 @@ trait ActiveRelationTrait ...@@ -22,8 +22,8 @@ trait ActiveRelationTrait
/** /**
* @var boolean whether this query represents a relation to more than one record. * @var boolean whether this query represents a relation to more than one record.
* This property is only used in relational context. If true, this relation will * This property is only used in relational context. If true, this relation will
* populate all query results into AR instances using [[all()]]. * populate all query results into AR instances using [[Query::all()|all()]].
* If false, only the first row of the results will be retrieved using [[one()]]. * If false, only the first row of the results will be retrieved using [[Query::one()|one()]].
*/ */
public $multiple; public $multiple;
/** /**
......
...@@ -748,7 +748,7 @@ class QueryBuilder extends \yii\base\Object ...@@ -748,7 +748,7 @@ class QueryBuilder extends \yii\base\Object
/** /**
* @param integer $limit * @param integer $limit
* @param integer $offset * @param integer $offset
* @return string the LIMIT and OFFSET clauses built from [[Query::$limit]]. * @return string the LIMIT and OFFSET clauses
*/ */
public function buildLimit($limit, $offset) public function buildLimit($limit, $offset)
{ {
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
namespace yii\db\oci; namespace yii\db\oci;
use yii\base\InvalidParamException; use yii\base\InvalidParamException;
use yii\db\ActiveQuery;
use yii\db\ActiveRecord;
/** /**
* QueryBuilder is the query builder for Oracle databases. * QueryBuilder is the query builder for Oracle databases.
......
...@@ -60,7 +60,7 @@ class AccessRule extends Component ...@@ -60,7 +60,7 @@ class AccessRule extends Component
* @var array list of request methods (e.g. `GET`, `POST`) that this rule applies to. * @var array list of request methods (e.g. `GET`, `POST`) that this rule applies to.
* The request methods must be specified in uppercase. * The request methods must be specified in uppercase.
* If not set or empty, it means this rule applies to all request methods. * If not set or empty, it means this rule applies to all request methods.
* @see Request::requestMethod * @see \yii\web\Request::method
*/ */
public $verbs; public $verbs;
/** /**
......
...@@ -138,7 +138,7 @@ class HttpCache extends ActionFilter ...@@ -138,7 +138,7 @@ class HttpCache extends ActionFilter
/** /**
* Sends the cache control header to the client * Sends the cache control header to the client
* @see cacheControl * @see cacheControlHeader
*/ */
protected function sendCacheControlHeader() protected function sendCacheControlHeader()
{ {
......
...@@ -99,7 +99,7 @@ class PageCache extends ActionFilter ...@@ -99,7 +99,7 @@ class PageCache extends ActionFilter
public $enabled = true; public $enabled = true;
/** /**
* @var \yii\base\View the view component to use for caching. If not set, the default application view component * @var \yii\base\View the view component to use for caching. If not set, the default application view component
* [[Application::view]] will be used. * [[\yii\web\Application::view]] will be used.
*/ */
public $view; public $view;
......
...@@ -301,7 +301,7 @@ class BaseHtml ...@@ -301,7 +301,7 @@ class BaseHtml
* @param string $text link body. It will NOT be HTML-encoded. Therefore you can pass in HTML code * @param string $text link body. It will NOT be HTML-encoded. Therefore you can pass in HTML code
* such as an image tag. If this is coming from end users, you should consider [[encode()]] * such as an image tag. If this is coming from end users, you should consider [[encode()]]
* it to prevent XSS attacks. * it to prevent XSS attacks.
* @param array|string|null $url the URL for the hyperlink tag. This parameter will be processed by [[yii\helpers\Url::to()]] * @param array|string|null $url the URL for the hyperlink tag. This parameter will be processed by [[\yii\helpers\Url::to()]]
* and will be used for the "href" attribute of the tag. If this parameter is null, the "href" attribute * and will be used for the "href" attribute of the tag. If this parameter is null, the "href" attribute
* will not be generated. * will not be generated.
* @param array $options the tag options in terms of name-value pairs. These will be rendered as * @param array $options the tag options in terms of name-value pairs. These will be rendered as
...@@ -309,7 +309,7 @@ class BaseHtml ...@@ -309,7 +309,7 @@ class BaseHtml
* If a value is null, the corresponding attribute will not be rendered. * If a value is null, the corresponding attribute will not be rendered.
* See [[renderTagAttributes()]] for details on how attributes are being rendered. * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated hyperlink * @return string the generated hyperlink
* @see yii\helpers\Url::to() * @see \yii\helpers\Url::to()
*/ */
public static function a($text, $url = null, $options = []) public static function a($text, $url = null, $options = [])
{ {
...@@ -342,7 +342,7 @@ class BaseHtml ...@@ -342,7 +342,7 @@ class BaseHtml
/** /**
* Generates an image tag. * Generates an image tag.
* @param array|string $src the image URL. This parameter will be processed by [[yii\helpers\Url::to()]]. * @param array|string $src the image URL. This parameter will be processed by [[\yii\helpers\Url::to()]].
* @param array $options the tag options in terms of name-value pairs. These will be rendered as * @param array $options the tag options in terms of name-value pairs. These will be rendered as
* the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]]. * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
* If a value is null, the corresponding attribute will not be rendered. * If a value is null, the corresponding attribute will not be rendered.
......
...@@ -269,8 +269,8 @@ class BaseUrl ...@@ -269,8 +269,8 @@ class BaseUrl
/** /**
* Returns the canonical URL of the currently requested page. * Returns the canonical URL of the currently requested page.
* The canonical URL is constructed using the current controller's [[yii\web\Controller::route]] and * The canonical URL is constructed using the current controller's [[\yii\web\Controller::route]] and
* [[yii\web\Controller::actionParams]]. You may use the following code in the layout view to add a link tag * [[\yii\web\Controller::actionParams]]. You may use the following code in the layout view to add a link tag
* about canonical URL: * about canonical URL:
* *
* ```php * ```php
......
...@@ -88,7 +88,7 @@ class Dispatcher extends Component ...@@ -88,7 +88,7 @@ class Dispatcher extends Component
} }
/** /**
* Initializes the logger by registering [[flush()]] as a shutdown function. * @inheritdoc
*/ */
public function init() public function init()
{ {
......
...@@ -12,7 +12,7 @@ use yii\base\Object; ...@@ -12,7 +12,7 @@ use yii\base\Object;
/** /**
* Assignment represents an assignment of a role to a user. * Assignment represents an assignment of a role to a user.
* It includes additional assignment information such as [[bizRule]] and [[data]]. * It includes additional assignment information such as [[ruleName]] and [[data]].
* Do not create a Assignment instance using the 'new' operator. * Do not create a Assignment instance using the 'new' operator.
* Instead, call [[Manager::assign()]]. * Instead, call [[Manager::assign()]].
* *
......
...@@ -181,7 +181,7 @@ class Serializer extends Component ...@@ -181,7 +181,7 @@ class Serializer extends Component
* Serializes a pagination into an array. * Serializes a pagination into an array.
* @param Pagination $pagination * @param Pagination $pagination
* @return array the array representation of the pagination * @return array the array representation of the pagination
* @see addPaginationHeader() * @see addPaginationHeaders()
*/ */
protected function serializePagination($pagination) protected function serializePagination($pagination)
{ {
......
...@@ -47,12 +47,10 @@ use yii\web\CompositeUrlRule; ...@@ -47,12 +47,10 @@ use yii\web\CompositeUrlRule;
* ] * ]
* ``` * ```
* *
* The property [[controller]] is required and should be the controller ID. It should be prefixed with * The property [[controller]] is required and should represent one or multiple controller IDs.
* the module ID if the controller is within a module. * Each controller ID should be prefixed with the module ID if the controller is within a module.
*
* The controller ID used in the pattern will be automatically pluralized (e.g. `user` becomes `users` * The controller ID used in the pattern will be automatically pluralized (e.g. `user` becomes `users`
* as shown in the above examples). You may configure [[urlName]] to explicitly specify the controller ID * as shown in the above examples).
* in the pattern.
* *
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
...@@ -133,7 +131,7 @@ class UrlRule extends CompositeUrlRule ...@@ -133,7 +131,7 @@ class UrlRule extends CompositeUrlRule
* @var boolean whether to automatically pluralize the URL names for controllers. * @var boolean whether to automatically pluralize the URL names for controllers.
* If true, a controller ID will appear in plural form in URLs. For example, `user` controller * If true, a controller ID will appear in plural form in URLs. For example, `user` controller
* will appear as `users` in URLs. * will appear as `users` in URLs.
* @see controllers * @see controller
*/ */
public $pluralize = true; public $pluralize = true;
......
...@@ -48,7 +48,7 @@ class Controller extends \yii\base\Controller ...@@ -48,7 +48,7 @@ class Controller extends \yii\base\Controller
/** /**
* Binds the parameters to the action. * Binds the parameters to the action.
* This method is invoked by [[Action]] when it begins to run with the given parameters. * This method is invoked by [[\yii\base\Action]] when it begins to run with the given parameters.
* This method will check the parameter names that the action requires and return * This method will check the parameter names that the action requires and return
* the provided parameters according to the requirement. If there is any missing parameter, * the provided parameters according to the requirement. If there is any missing parameter,
* an exception will be thrown. * an exception will be thrown.
......
...@@ -100,7 +100,7 @@ class Request extends \yii\base\Request ...@@ -100,7 +100,7 @@ class Request extends \yii\base\Request
* *
* Note, this feature requires that the user client accepts cookie. Also, to use this feature, * Note, this feature requires that the user client accepts cookie. Also, to use this feature,
* forms submitted via POST method must contain a hidden input whose name is specified by [[csrfParam]]. * forms submitted via POST method must contain a hidden input whose name is specified by [[csrfParam]].
* You may use [[\yii\web\Html::beginForm()]] to generate his hidden input. * You may use [[\yii\helpers\Html::beginForm()]] to generate his hidden input.
* *
* In JavaScript, you may get the values of [[csrfParam]] and [[csrfToken]] via `yii.getCsrfParam()` and * In JavaScript, you may get the values of [[csrfParam]] and [[csrfToken]] via `yii.getCsrfParam()` and
* `yii.getCsrfToken()`, respectively. The [[\yii\web\YiiAsset]] asset must be registered. * `yii.getCsrfToken()`, respectively. The [[\yii\web\YiiAsset]] asset must be registered.
...@@ -337,7 +337,7 @@ class Request extends \yii\base\Request ...@@ -337,7 +337,7 @@ class Request extends \yii\base\Request
* Returns the request parameters given in the request body. * Returns the request parameters given in the request body.
* *
* Request parameters are determined using the parsers configured in [[parsers]] property. * Request parameters are determined using the parsers configured in [[parsers]] property.
* If no parsers are configured for the current [[contentType]] it uses the PHP function [[mb_parse_str()]] * If no parsers are configured for the current [[contentType]] it uses the PHP function `mb_parse_str()`
* to parse the [[rawBody|request body]]. * to parse the [[rawBody|request body]].
* @return array the request parameters given in the request body. * @return array the request parameters given in the request body.
* @throws \yii\base\InvalidConfigException if a registered parser does not implement the [[RequestParserInterface]]. * @throws \yii\base\InvalidConfigException if a registered parser does not implement the [[RequestParserInterface]].
......
...@@ -108,7 +108,7 @@ class Response extends \yii\base\Response ...@@ -108,7 +108,7 @@ class Response extends \yii\base\Response
public $acceptMimeType; public $acceptMimeType;
/** /**
* @var array the parameters (e.g. `['q' => 1, 'version' => '1.0']`) associated with the [[acceptMimeType|chosen MIME type]]. * @var array the parameters (e.g. `['q' => 1, 'version' => '1.0']`) associated with the [[acceptMimeType|chosen MIME type]].
* This is a list of name-value pairs associated with [[mimeType]] from the ACCEPT HTTP header. * This is a list of name-value pairs associated with [[acceptMimeType]] from the ACCEPT HTTP header.
* This property is mainly set by [\yii\filters\ContentNegotiator]]. * This property is mainly set by [\yii\filters\ContentNegotiator]].
*/ */
public $acceptParams = []; public $acceptParams = [];
......
...@@ -32,7 +32,7 @@ use yii\base\InvalidParamException; ...@@ -32,7 +32,7 @@ use yii\base\InvalidParamException;
* ~~~ * ~~~
* *
* Session can be extended to support customized session storage. * Session can be extended to support customized session storage.
* To do so, override [[useCustomStorage()]] so that it returns true, and * To do so, override [[useCustomStorage]] so that it returns true, and
* override these methods with the actual logic about using custom storage: * override these methods with the actual logic about using custom storage:
* [[openSession()]], [[closeSession()]], [[readSession()]], [[writeSession()]], * [[openSession()]], [[closeSession()]], [[readSession()]], [[writeSession()]],
* [[destroySession()]] and [[gcSession()]]. * [[destroySession()]] and [[gcSession()]].
...@@ -429,7 +429,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co ...@@ -429,7 +429,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
/** /**
* Session open handler. * Session open handler.
* This method should be overridden if [[useCustomStorage()]] returns true. * This method should be overridden if [[useCustomStorage]] returns true.
* Do not call this method directly. * Do not call this method directly.
* @param string $savePath session save path * @param string $savePath session save path
* @param string $sessionName session name * @param string $sessionName session name
...@@ -442,7 +442,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co ...@@ -442,7 +442,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
/** /**
* Session close handler. * Session close handler.
* This method should be overridden if [[useCustomStorage()]] returns true. * This method should be overridden if [[useCustomStorage]] returns true.
* Do not call this method directly. * Do not call this method directly.
* @return boolean whether session is closed successfully * @return boolean whether session is closed successfully
*/ */
...@@ -453,7 +453,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co ...@@ -453,7 +453,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
/** /**
* Session read handler. * Session read handler.
* This method should be overridden if [[useCustomStorage()]] returns true. * This method should be overridden if [[useCustomStorage]] returns true.
* Do not call this method directly. * Do not call this method directly.
* @param string $id session ID * @param string $id session ID
* @return string the session data * @return string the session data
...@@ -465,7 +465,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co ...@@ -465,7 +465,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
/** /**
* Session write handler. * Session write handler.
* This method should be overridden if [[useCustomStorage()]] returns true. * This method should be overridden if [[useCustomStorage]] returns true.
* Do not call this method directly. * Do not call this method directly.
* @param string $id session ID * @param string $id session ID
* @param string $data session data * @param string $data session data
...@@ -478,7 +478,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co ...@@ -478,7 +478,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
/** /**
* Session destroy handler. * Session destroy handler.
* This method should be overridden if [[useCustomStorage()]] returns true. * This method should be overridden if [[useCustomStorage]] returns true.
* Do not call this method directly. * Do not call this method directly.
* @param string $id session ID * @param string $id session ID
* @return boolean whether session is destroyed successfully * @return boolean whether session is destroyed successfully
...@@ -490,7 +490,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co ...@@ -490,7 +490,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
/** /**
* Session GC (garbage collection) handler. * Session GC (garbage collection) handler.
* This method should be overridden if [[useCustomStorage()]] returns true. * This method should be overridden if [[useCustomStorage]] returns true.
* Do not call this method directly. * Do not call this method directly.
* @param integer $maxLifetime the number of seconds after which data will be seen as 'garbage' and cleaned up. * @param integer $maxLifetime the number of seconds after which data will be seen as 'garbage' and cleaned up.
* @return boolean whether session is GCed successfully * @return boolean whether session is GCed successfully
......
...@@ -43,7 +43,7 @@ class UploadedFile extends Object ...@@ -43,7 +43,7 @@ class UploadedFile extends Object
/** /**
* @var string the MIME-type of the uploaded file (such as "image/gif"). * @var string 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. * 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. * Instead, use [[\yii\helpers\FileHelper::getMimeType()]] to determine the exact MIME type.
*/ */
public $type; public $type;
/** /**
...@@ -70,7 +70,7 @@ class UploadedFile extends Object ...@@ -70,7 +70,7 @@ class UploadedFile extends Object
/** /**
* Returns an uploaded file for the given model attribute. * Returns an uploaded file for the given model attribute.
* The file should be uploaded using [[ActiveForm::fileInput()]]. * The file should be uploaded using [[\yii\widgets\ActiveField::fileInput()]].
* @param \yii\base\Model $model the data model * @param \yii\base\Model $model the data model
* @param string $attribute the attribute name. The attribute name may contain array indexes. * @param string $attribute the attribute name. The attribute name may contain array indexes.
* For example, '[1]file' for tabular file uploading; and 'file[1]' for an element in a file array. * For example, '[1]file' for tabular file uploading; and 'file[1]' for an element in a file array.
......
...@@ -578,13 +578,13 @@ class User extends Component ...@@ -578,13 +578,13 @@ class User extends Component
* @param string $operation the name of the operation that need access check. * @param string $operation the name of the operation that need access check.
* @param array $params name-value pairs that would be passed to business rules associated * @param array $params name-value pairs that would be passed to business rules associated
* with the tasks and roles assigned to the user. A param with name 'userId' is added to * with the tasks and roles assigned to the user. A param with name 'userId' is added to
* this array, which holds the value of [[id]] when [[DbAuthManager]] or * this array, which holds the value of [[id]] when [[\yii\rbac\DbManager]] or
* [[PhpAuthManager]] is used. * [[\yii\rbac\PhpManager]] is used.
* @param boolean $allowCaching whether to allow caching the result of access check. * @param boolean $allowCaching whether to allow caching the result of access check.
* When this parameter is true (default), if the access check of an operation was performed * When this parameter is true (default), if the access check of an operation was performed
* before, its result will be directly returned when calling this method to check the same * before, its result will be directly returned when calling this method to check the same
* operation. If this parameter is false, this method will always call * operation. If this parameter is false, this method will always call
* [[AuthManager::checkAccess()]] to obtain the up-to-date access result. Note that this * [[\yii\rbac\Manager::checkAccess()]] to obtain the up-to-date access result. Note that this
* caching is effective only within the same request and only works when `$params = []`. * caching is effective only within the same request and only works when `$params = []`.
* @return boolean whether the operations can be performed by this user. * @return boolean whether the operations can be performed by this user.
*/ */
......
...@@ -123,7 +123,7 @@ class LinkPager extends Widget ...@@ -123,7 +123,7 @@ class LinkPager extends Widget
/** /**
* Registers relational link tags in the html header for prev, next, first and last page. * Registers relational link tags in the html header for prev, next, first and last page.
* These links are generated using [[yii\data\Pagination::getLinks()]]. * These links are generated using [[\yii\data\Pagination::getLinks()]].
* @see http://www.w3.org/TR/html401/struct/links.html#h-12.1.2 * @see http://www.w3.org/TR/html401/struct/links.html#h-12.1.2
*/ */
protected function registerLinkTags() protected function registerLinkTags()
......
...@@ -61,7 +61,7 @@ class Menu extends Widget ...@@ -61,7 +61,7 @@ class Menu extends Widget
* - active: boolean, optional, whether this menu item is in active state (currently selected). * - active: boolean, optional, whether this menu item is in active state (currently selected).
* If a menu item is active, its CSS class will be appended with [[activeCssClass]]. * If a menu item is active, its CSS class will be appended with [[activeCssClass]].
* If this option is not set, the menu item will be set active automatically when the current request * If this option is not set, the menu item will be set active automatically when the current request
* is triggered by [[url]]. For more details, please refer to [[isItemActive()]]. * is triggered by `url`. For more details, please refer to [[isItemActive()]].
* - template: string, optional, the template used to render the content of this menu item. * - template: string, optional, the template used to render the content of this menu item.
* The token `{url}` will be replaced by the URL associated with this menu item, * The token `{url}` will be replaced by the URL associated with this menu item,
* and the token `{label}` will be replaced by the label of the menu item. * and the token `{label}` will be replaced by the label of the menu item.
......
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