Commit 7f882d3a by Qiang Xue

Merge branch 'master' of git://github.com/yiisoft/yii2

parents 02b908bd 32b9f87b
......@@ -11,6 +11,7 @@ use phpDocumentor\Reflection\FileReflector;
use TokenReflection\ReflectionFile;
use yii\apidoc\templates\BaseRenderer;
use yii\console\Controller;
use yii\helpers\ArrayHelper;
use yii\helpers\Console;
use yii\helpers\FileHelper;
use yii\apidoc\components\OfflineRenderer;
......@@ -105,6 +106,7 @@ class RenderController extends Controller
// render models
$renderer->renderApi($context, $this);
ArrayHelper::multisort($context->errors, 'file');
print_r($context->errors);
// render guide if specified
......
......@@ -22,6 +22,9 @@ class ClassDoc extends TypeDoc
public $isAbstract;
public $isFinal;
/**
* @var string[]
*/
public $interfaces = [];
public $traits = [];
// will be set by Context::updateReferences()
......
......@@ -88,11 +88,6 @@ class Context extends Component
}
// update implementedBy and usedBy for interfaces and traits
foreach($this->classes as $class) {
foreach($class->interfaces as $interface) {
if (isset($this->interfaces[$interface])) {
$this->interfaces[$interface]->implementedBy[] = $class->name;
}
}
foreach($class->traits as $trait) {
if (isset($this->traits[$trait])) {
$trait = $this->traits[$trait];
......@@ -101,6 +96,19 @@ class Context extends Component
$class->methods = array_merge($trait->methods, $class->methods);
}
}
foreach($class->interfaces as $interface) {
if (isset($this->interfaces[$interface])) {
$this->interfaces[$interface]->implementedBy[] = $class->name;
if ($class->isAbstract) {
// add not implemented interface methods
foreach($this->interfaces[$interface]->methods as $method) {
if (!isset($class->methods[$method->name])) {
$class->methods[$method->name] = $method;
}
}
}
}
}
}
// inherit properties, methods, contants and events to subclasses
foreach($this->classes as $class) {
......@@ -145,7 +153,7 @@ class Context extends Component
}
/**
* Add properties for getters and setters if class is subclass of [[yii\base\Object]].
* Add properties for getters and setters if class is subclass of [[\yii\base\Object]].
* @param ClassDoc $class
*/
protected function handlePropertyFeature($class)
......
......@@ -37,6 +37,10 @@ class InterfaceDoc extends TypeDoc
$this->parentInterfaces[] = ltrim($interface, '\\');
}
foreach($this->methods as $method) {
$method->isAbstract = true;
}
// interface can not have properties
$this->properties = null;
}
......
......@@ -100,6 +100,7 @@ class BaseYii
/**
* Returns a string representing the current version of the Yii framework.
* @return string the version of Yii framework
*/
public static function getVersion()
......@@ -482,7 +483,7 @@ class BaseYii
* ```
*
* Further formatting of message parameters is supported using the [PHP intl extensions](http://www.php.net/manual/en/intro.intl.php)
* message formatter. See [[yii\i18n\I18N::translate()]] for more details.
* message formatter. See [[\yii\i18n\I18N::translate()]] for more details.
*
* @param string $category the message category.
* @param string $message the message to be translated.
......
......@@ -12,8 +12,8 @@ require(__DIR__ . '/BaseYii.php');
/**
* Yii is a helper class serving common framework functionalities.
*
* It extends from [[yii\BaseYii]] which provides the actual implementation.
* By writing your own Yii class, you can customize some functionalities of [[yii\BaseYii]].
* It extends from [[\yii\BaseYii]] which provides the actual implementation.
* By writing your own Yii class, you can customize some functionalities of [[\yii\BaseYii]].
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
......
......@@ -16,7 +16,7 @@ use yii\web\HttpException;
* ErrorHandler displays these errors using appropriate views based on the
* nature of the errors and the mode the application runs at.
*
* ErrorHandler is configured as an application component in [[yii\base\Application]] by default.
* ErrorHandler is configured as an application component in [[\yii\base\Application]] by default.
* You can access that instance via `Yii::$app->errorHandler`.
*
* @author Qiang Xue <qiang.xue@gmail.com>
......
......@@ -19,7 +19,7 @@ use yii\helpers\Html;
* The behavior of some of them may be configured via the properties of Formatter. For example,
* by configuring [[dateFormat]], one may control how [[asDate()]] formats the value into a date string.
*
* Formatter is configured as an application component in [[yii\base\Application]] by default.
* Formatter is configured as an application component in [[\yii\base\Application]] by default.
* You can access that instance via `Yii::$app->formatter`.
*
* @author Qiang Xue <qiang.xue@gmail.com>
......
......@@ -53,7 +53,7 @@ abstract class Cache extends Component implements \ArrayAccess
{
/**
* @var string a string prefixed to every cache key so that it is unique. If not set,
* it will use a prefix generated from [[Application::id]]. You may set this property to be an empty string
* it will use a prefix generated from [[\yii\base\Application::id]]. You may set this property to be an empty string
* if you don't want to use key prefix. It is recommended that you explicitly set this property to some
* static value if the cached data needs to be shared among multiple applications.
*
......
......@@ -25,7 +25,7 @@ use yii\widgets\InputWidget;
* When the user clicks on the CAPTCHA image, it will cause the CAPTCHA image
* to be refreshed with a new CAPTCHA.
*
* You may use [[\yii\validators\CaptchaValidator]] to validate the user input matches
* You may use [[\yii\captcha\CaptchaValidator]] to validate the user input matches
* the current CAPTCHA verification code.
*
* @author Qiang Xue <qiang.xue@gmail.com>
......
......@@ -14,7 +14,7 @@ use yii\base\InvalidConfigException;
/**
* CaptchaAction renders a CAPTCHA image.
*
* CaptchaAction is used together with [[Captcha]] and [[\yii\validators\CaptchaValidator]]
* CaptchaAction is used together with [[Captcha]] and [[\yii\captcha\CaptchaValidator]]
* to provide the [CAPTCHA](http://en.wikipedia.org/wiki/Captcha) feature.
*
* By configuring the properties of CaptchaAction, you may customize the appearance of
......
......@@ -133,7 +133,7 @@ class Controller extends \yii\base\Controller
/**
* Formats a string with ANSI codes
*
* You may pass additional parameters using the constants defined in [[yii\helpers\Console]].
* You may pass additional parameters using the constants defined in [[\yii\helpers\Console]].
*
* Example:
*
......@@ -158,7 +158,7 @@ class Controller extends \yii\base\Controller
* Prints a string to STDOUT
*
* You may optionally format the string with ANSI codes by
* passing additional parameters using the constants defined in [[yii\helpers\Console]].
* passing additional parameters using the constants defined in [[\yii\helpers\Console]].
*
* Example:
*
......@@ -183,7 +183,7 @@ class Controller extends \yii\base\Controller
* Prints a string to STDERR
*
* You may optionally format the string with ANSI codes by
* passing additional parameters using the constants defined in [[yii\helpers\Console]].
* passing additional parameters using the constants defined in [[\yii\helpers\Console]].
*
* Example:
*
......
......@@ -83,7 +83,7 @@ class AssetController extends Controller
public $cssCompressor = 'java -jar yuicompressor.jar -o --type css {from} {to}';
/**
* @var array|\yii\web\AssetManager [[yii\web\AssetManager]] instance or its array configuration, which will be used
* @var array|\yii\web\AssetManager [[\yii\web\AssetManager]] instance or its array configuration, which will be used
* for assets processing.
*/
private $_assetManager = [];
......
......@@ -64,7 +64,7 @@ class ActiveDataProvider extends BaseDataProvider
*
* If this is not set, the following rules will be used to determine the keys of the data models:
*
* - If [[query]] is an [[ActiveQuery]] instance, the primary keys of [[ActiveQuery::modelClass]] will be used.
* - If [[query]] is an [[\yii\db\ActiveQuery]] instance, the primary keys of [[\yii\db\ActiveQuery::modelClass]] will be used.
* - Otherwise, the keys of the [[models]] array will be used.
*
* @see getKeys()
......
......@@ -11,7 +11,7 @@ namespace yii\data;
* DataProviderInterface is the interface that must be implemented by data provider classes.
*
* Data providers are components that sort and paginate data, and provide them to widgets
* such as [[GridView]], [[ListView]].
* such as [[\yii\grid\GridView]], [[\yii\widgets\ListView]].
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
......@@ -33,14 +33,14 @@ interface DataProviderInterface
/**
* Returns the number of data models in the current page.
* This is equivalent to `count($provider->getModels())`.
* When [[pagination]] is false, this is the same as [[totalCount]].
* When [[getPagination|pagination]] is false, this is the same as [[getTotalCount|totalCount]].
* @return integer the number of data models in the current page.
*/
public function getCount();
/**
* Returns the total number of data models.
* When [[pagination]] is false, this is the same as [[count]].
* When [[getPagination|pagination]] is false, this is the same as [[getCount|count]].
* @return integer total number of possible data models.
*/
public function getTotalCount();
......@@ -53,7 +53,7 @@ interface DataProviderInterface
/**
* Returns the key values associated with the data models.
* @return array the list of key values corresponding to [[models]]. Each data model in [[models]]
* @return array the list of key values corresponding to [[getModels|models]]. Each data model in [[getModels|models]]
* is uniquely identified by the corresponding key value in this array.
*/
public function getKeys();
......
......@@ -15,7 +15,7 @@ use yii\helpers\StringHelper;
/**
* ModelSerializer converts a model or a list of models into an array representation with selected fields.
*
* Used together with [[\yii\web\ResponseFormatter]], ModelSerializer can be used to serve model data
* Used together with [[\yii\web\ResponseFormatterInterface]], ModelSerializer can be used to serve model data
* in JSON or XML format for REST APIs.
*
* ModelSerializer provides two methods [[export()]] and [[exportAll()]] to convert model(s) into array(s).
......
......@@ -16,7 +16,7 @@ use yii\web\Request;
*
* When data needs to be rendered in multiple pages, Pagination can be used to
* represent information such as [[totalCount|total item count]], [[pageSize|page size]],
* [[page|current page]], etc. These information can be passed to [[yii\widgets\Pager|pagers]]
* [[page|current page]], etc. These information can be passed to [[\yii\widgets\LinkPager|pagers]]
* to render pagination buttons or links.
*
* The following example shows how to create a pagination object and feed it
......
......@@ -171,7 +171,7 @@ class Sort extends Object
* In order to add hash to all links use `array_merge($_GET, ['#' => 'my-hash'])`.
*
* The array element indexed by [[sortVar]] is considered to be the current sort directions.
* If the element does not exist, the [[defaults|default order]] will be used.
* If the element does not exist, the [[defaultOrder|default order]] will be used.
*
* @see sortVar
* @see defaultOrder
......@@ -293,7 +293,7 @@ class Sort extends Object
* @param array $options additional HTML attributes for the hyperlink tag.
* There is one special attribute `label` which will be used as the label of the hyperlink.
* If this is not set, the label defined in [[attributes]] will be used.
* If no label is defined, [[yii\helpers\Inflector::camel2words()]] will be called to get a label.
* If no label is defined, [[\yii\helpers\Inflector::camel2words()]] will be called to get a label.
* Note that it will not be HTML-encoded.
* @return string the generated hyperlink
* @throws InvalidConfigException if the attribute is unknown
......
......@@ -50,7 +50,7 @@ interface ActiveQueryInterface extends QueryInterface
* The parameters to this method can be either one or multiple strings, or a single array
* of relation names and the optional callbacks to customize the relations.
*
* A relation name can refer to a relation defined in [[modelClass]]
* A relation name can refer to a relation defined in [[ActiveQueryTrait::modelClass|modelClass]]
* or a sub-relation that stands for a relation of a related record.
* For example, `orders.address` means the `address` relation defined
* in the model class corresponding to the `orders` relation.
......
......@@ -177,7 +177,7 @@ class ActiveRecord extends BaseActiveRecord
/**
* Declares the name of the database table associated with this AR class.
* By default this method returns the class name as the table name by calling [[Inflector::camel2id()]]
* with prefix [[DbConnection::tablePrefix]]. For example if [[DbConnection::tablePrefix]] is 'tbl_',
* with prefix [[Connection::tablePrefix]]. For example if [[Connection::tablePrefix]] is 'tbl_',
* 'Customer' becomes 'tbl_customer', and 'OrderItem' becomes 'tbl_order_item'. You may override this method
* if the table is not named after this convention.
* @return string the table name
......@@ -391,7 +391,7 @@ class ActiveRecord extends BaseActiveRecord
* [[EVENT_BEFORE_UPDATE]], [[EVENT_AFTER_UPDATE]] and [[EVENT_AFTER_VALIDATE]]
* will be raised by the corresponding methods.
*
* Only the [[changedAttributes|changed attribute values]] will be saved into database.
* Only the [[dirtyAttributes|changed attribute values]] will be saved into database.
*
* For example, to update a customer record:
*
......
......@@ -169,8 +169,8 @@ interface ActiveRecordInterface
/**
* Saves the current record.
*
* This method will call [[insert()]] when [[isNewRecord]] is true, or [[update()]]
* when [[isNewRecord]] is false.
* This method will call [[insert()]] when [[getIsNewRecord|isNewRecord]] is true, or [[update()]]
* when [[getIsNewRecord|isNewRecord]] is false.
*
* For example, to save a customer record:
*
......
......@@ -30,14 +30,14 @@ class ActiveRelation extends ActiveQuery implements ActiveRelationInterface
/**
* @var string|array the join condition. Please refer to [[Query::where()]] on how to specify this parameter.
* The condition will be used in the ON part when [[ActiveQuery::joinRelation()]] is called.
* The condition will be used in the ON part when [[ActiveQuery::joinWith()]] is called.
* Otherwise, the condition will be used in the WHERE part of a query.
*/
public $on;
/**
* Sets the ON condition for the query.
* The condition will be used in the ON part when [[ActiveQuery::joinRelation()]] is called.
* The condition will be used in the ON part when [[ActiveQuery::joinWith()]] is called.
* Otherwise, the condition will be used in the WHERE part of a query.
* @param string|array $condition the ON condition. Please refer to [[Query::where()]] on how to specify this parameter.
* @param array $params the parameters (name => value) to be bound to the query.
......
......@@ -20,7 +20,7 @@ interface ActiveRelationInterface extends ActiveQueryInterface
{
/**
* Specifies the relation associated with the pivot table.
* @param string $relationName the relation name. This refers to a relation declared in [[primaryModel]].
* @param string $relationName the relation name. This refers to a relation declared in the [[ActiveRelationTrait::primaryModel|primaryModel]] of the relation.
* @param callable $callable a PHP callback for customizing the relation associated with the pivot table.
* Its signature should be `function($query)`, where `$query` is the query to be customized.
* @return static the relation object itself.
......
......@@ -593,7 +593,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* [[EVENT_BEFORE_UPDATE]], [[EVENT_AFTER_UPDATE]] and [[EVENT_AFTER_VALIDATE]]
* will be raised by the corresponding methods.
*
* Only the [[changedAttributes|changed attribute values]] will be saved into database.
* Only the [[dirtyAttributes|changed attribute values]] will be saved into database.
*
* For example, to update a customer record:
*
......
......@@ -312,7 +312,7 @@ class Migration extends \yii\base\Component
* Builds and executes a SQL statement for changing the definition of a column.
* @param string $table the table whose column is to be changed. The table name will be properly quoted by the method.
* @param string $column the name of the column to be changed. The name will be properly quoted by the method.
* @param string $type the new column type. The [[getColumnType()]] method will be invoked to convert abstract column type (if any)
* @param string $type the new column type. The [[QueryBuilder::getColumnType()]] method will be invoked to convert abstract column type (if any)
* into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL.
* For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'.
*/
......
......@@ -10,12 +10,7 @@ namespace yii\db;
/**
* The BaseQuery trait represents the minimum method set of a database Query.
*
* It has support for getting [[one]] instance or [[all]].
* Allows pagination via [[limit]] and [[offset]].
* Sorting is supported via [[orderBy]] and items can be limited to match some conditions unsing [[where]].
*
* By calling [[createCommand()]], we can get a [[Command]] instance which can be further
* used to perform/execute the DB query against a database.
* It is supposed to be used in a class that implements the [[QueryInterface]].
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Carsten Brandt <mail@cebe.cc>
......
......@@ -59,7 +59,7 @@ class Transaction extends \yii\base\Object
/**
* Begins a transaction.
* @throws InvalidConfigException if [[connection]] is null
* @throws InvalidConfigException if [[db]] is `null`.
*/
public function begin()
{
......@@ -76,7 +76,7 @@ class Transaction extends \yii\base\Object
/**
* Commits a transaction.
* @throws Exception if the transaction or the DB connection is not active.
* @throws Exception if the transaction or the [[db|DB connection]] is not active.
*/
public function commit()
{
......@@ -91,7 +91,7 @@ class Transaction extends \yii\base\Object
/**
* Rolls back a transaction.
* @throws Exception if the transaction or the DB connection is not active.
* @throws Exception if the transaction or the [[db|DB connection]] is not active.
*/
public function rollback()
{
......
......@@ -52,7 +52,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* @param integer $limit
* @param integer $offset
* @return string the LIMIT and OFFSET clauses built from [[query]].
* @return string the LIMIT and OFFSET clauses built from [[\yii\db\Query::$limit]].
*/
public function buildLimit($limit, $offset = 0)
{
......
......@@ -72,7 +72,7 @@ class Column extends Object
* Renders a data cell.
* @param mixed $model the data model being rendered
* @param mixed $key the key associated with the data model
* @param integer $index the zero-based index of the data item among the item array returned by [[dataProvider]].
* @param integer $index the zero-based index of the data item among the item array returned by [[GridView::dataProvider]].
* @return string the rendering result
*/
public function renderDataCell($model, $key, $index)
......@@ -119,7 +119,7 @@ class Column extends Object
* Renders the data cell content.
* @param mixed $model the data model
* @param mixed $key the key associated with the data model
* @param integer $index the zero-based index of the data model among the models array returned by [[dataProvider]].
* @param integer $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]].
* @return string the rendering result
*/
protected function renderDataCellContent($model, $key, $index)
......
......@@ -35,8 +35,8 @@ class DataColumn extends Column
* @var string label to be displayed in the [[header|header cell]] and also to be used as the sorting
* link label when sorting is enabled for this column.
* If it is not set and the models provided by the GridViews data provider are instances
* of [[yii\db\ActiveRecord]], the label will be determined using [[yii\db\ActiveRecord::getAttributeLabel()]].
* Otherwise [[yii\helpers\Inflector::camel2words()]] will be used to get a label.
* of [[\yii\db\ActiveRecord]], the label will be determined using [[\yii\db\ActiveRecord::getAttributeLabel()]].
* Otherwise [[\yii\helpers\Inflector::camel2words()]] will be used to get a label.
*/
public $label;
/**
......@@ -60,7 +60,7 @@ class DataColumn extends Column
public $enableSorting = true;
/**
* @var array the HTML attributes for the link tag in the header cell
* generated by [[Sort::link]] when sorting is enabled for this column.
* generated by [[\yii\data\Sort::link]] when sorting is enabled for this column.
*/
public $sortLinkOptions = [];
/**
......
......@@ -250,7 +250,7 @@ class BaseConsole
* You can pass any of the FG_*, BG_* and TEXT_* constants
* and also [[xtermFgColor]] and [[xtermBgColor]] to specify a format.
* @see ansiFormatCode()
* @see ansiFormatEnd()
* @see endAnsiFormat()
*/
public static function beginAnsiFormat($format)
{
......@@ -258,7 +258,7 @@ class BaseConsole
}
/**
* Resets any ANSI format set by previous method [[ansiFormatBegin()]]
* Resets any ANSI format set by previous method [[beginAnsiFormat()]]
* Any output after this will have default text format.
* This is equal to calling
*
......
......@@ -82,7 +82,7 @@ class BaseHtml
/**
* Encodes special characters into HTML entities.
* The [[yii\base\Application::charset|application charset]] will be used for encoding.
* The [[\yii\base\Application::charset|application charset]] will be used for encoding.
* @param string $content the content to be encoded
* @param boolean $doubleEncode whether to encode HTML entities in `$content`. If false,
* HTML entities in `$content` will not be further encoded.
......@@ -223,7 +223,7 @@ class BaseHtml
* @param string $method the form submission method, such as "post", "get", "put", "delete" (case-insensitive).
* Since most browsers only support "post" and "get", if other methods are given, they will
* be simulated using "post", and a hidden input will be added which contains the actual method type.
* See [[\yii\web\Request::restVar]] for more details.
* See [[\yii\web\Request::methodVar]] for more details.
* @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()]].
* If a value is null, the corresponding attribute will not be rendered.
......@@ -956,7 +956,7 @@ class BaseHtml
* If a value is null, the corresponding attribute will not be rendered.
* The following options are specially handled:
*
* - label: this specifies the label to be displayed. Note that this will NOT be [[encoded()]].
* - label: this specifies the label to be displayed. Note that this will NOT be [[encode()|encoded]].
* If this is not set, [[Model::getAttributeLabel()]] will be called to get the label for display
* (after encoding).
*
......
......@@ -15,7 +15,7 @@ use yii\base\InvalidConfigException;
/**
* I18N provides features related with internationalization (I18N) and localization (L10N).
*
* I18N is configured as an application component in [[yii\base\Application]] by default.
* I18N is configured as an application component in [[\yii\base\Application]] by default.
* You can access that instance via `Yii::$app->i18n`.
*
* @property MessageFormatter $messageFormatter The message formatter to be used to format message via ICU
......
......@@ -73,7 +73,7 @@ class MessageSource extends Component
* is the same as the [[sourceLanguage|source language]], the message
* will NOT be translated.
*
* If a translation is not found, a [[missingTranslation]] event will be triggered.
* If a translation is not found, a [[EVENT_MISSING_TRANSLATION|missingTranslation]] event will be triggered.
*
* @param string $category the message category
* @param string $message the message to be translated
......@@ -91,7 +91,7 @@ class MessageSource extends Component
/**
* Translates the specified message.
* If the message is not found, a [[missingTranslation]] event will be triggered
* If the message is not found, a [[EVENT_MISSING_TRANSLATION|missingTranslation]] event will be triggered
* and the original message will be returned.
* @param string $category the category that the message belongs to
* @param string $message the message to be translated
......
......@@ -221,7 +221,7 @@ class Logger extends Component
* Returns the total elapsed time since the start of the current request.
* This method calculates the difference between now and the timestamp
* defined by constant `YII_BEGIN_TIME` which is evaluated at the beginning
* of [[BaseYii]] class file.
* of [[\yii\BaseYii]] class file.
* @return float the total elapsed time in seconds for current request.
*/
public function getElapsedTime()
......
......@@ -14,7 +14,7 @@ use yii\base\InvalidConfigException;
* @author resurtm <resurtm@gmail.com>
* @since 2.0
*/
class MysqlMutex extends Mutex
class MysqlMutex extends DbMutex
{
/**
* Initializes MySQL specific mutex component implementation.
......
......@@ -35,7 +35,7 @@ class Assignment extends Object
*/
public $data;
/**
* @var mixed user ID (see [[User::id]]). Do not modify this property after it is populated.
* @var mixed user ID (see [[\yii\web\User::id]]). Do not modify this property after it is populated.
* To modify the user ID of an assignment, you must remove the assignment and create a new one.
*/
public $userId;
......
......@@ -72,7 +72,7 @@ class DbManager extends Manager
/**
* Performs access check for the specified user.
* @param mixed $userId the user ID. This should can be either an integer or a string representing
* the unique identifier of a user. See [[User::id]].
* the unique identifier of a user. See [[\yii\web\User::id]].
* @param string $itemName the name of the operation that need access check
* @param array $params name-value pairs that would be passed to biz rules associated
* with the tasks and roles assigned to the user. A param with name 'userId' is added to this array,
......@@ -89,7 +89,7 @@ class DbManager extends Manager
* Performs access check for the specified user.
* This method is internally called by [[checkAccess()]].
* @param mixed $userId the user ID. This should can be either an integer or a string representing
* the unique identifier of a user. See [[User::id]].
* the unique identifier of a user. See [[\yii\web\User::id]].
* @param string $itemName the name of the operation that need access check
* @param array $params name-value pairs that would be passed to biz rules associated
* with the tasks and roles assigned to the user. A param with name 'userId' is added to this array,
......@@ -233,7 +233,7 @@ class DbManager extends Manager
/**
* Assigns an authorization item to a user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @param string $bizRule the business rule to be executed when [[checkAccess()]] is called
* for this particular authorization item.
......@@ -265,7 +265,7 @@ class DbManager extends Manager
/**
* Revokes an authorization assignment from a user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @return boolean whether removal is successful
*/
......@@ -278,7 +278,7 @@ class DbManager extends Manager
/**
* Revokes all authorization assignments from a user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @return boolean whether removal is successful
*/
public function revokeAll($userId)
......@@ -290,7 +290,7 @@ class DbManager extends Manager
/**
* Returns a value indicating whether the item has been assigned to the user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @return boolean whether the item has been assigned to the user.
*/
......@@ -306,7 +306,7 @@ class DbManager extends Manager
/**
* Returns the item assignment information.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @return Assignment the item assignment information. Null is returned if
* the item is not assigned to the user.
......@@ -336,7 +336,7 @@ class DbManager extends Manager
/**
* Returns the item assignments for the specified user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @return Assignment[] the item assignment information for the user. An empty array will be
* returned if there is no item assigned to the user.
*/
......
......@@ -146,7 +146,7 @@ class Item extends Object
/**
* Assigns this item to a user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $bizRule the business rule to be executed when [[checkAccess()]] is called
* for this particular authorization item.
* @param mixed $data additional data associated with this assignment
......@@ -161,7 +161,7 @@ class Item extends Object
/**
* Revokes an authorization assignment from a user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @return boolean whether removal is successful
* @see Manager::revoke
*/
......@@ -172,7 +172,7 @@ class Item extends Object
/**
* Returns a value indicating whether this item has been assigned to the user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @return boolean whether the item has been assigned to the user.
* @see Manager::isAssigned
*/
......@@ -183,7 +183,7 @@ class Item extends Object
/**
* Returns the item assignment information.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @return Assignment the item assignment information. Null is returned if
* this item is not assigned to the user.
* @see Manager::getAssignment
......
......@@ -168,7 +168,7 @@ abstract class Manager extends Component
/**
* Performs access check for the specified user.
* @param mixed $userId the user ID. This should be either an integer or a string representing
* the unique identifier of a user. See [[User::id]].
* the unique identifier of a user. See [[\yii\web\User::id]].
* @param string $itemName the name of the operation that we are checking access to
* @param array $params name-value pairs that would be passed to biz rules associated
* with the tasks and roles assigned to the user.
......@@ -252,7 +252,7 @@ abstract class Manager extends Component
/**
* Assigns an authorization item to a user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @param string $bizRule the business rule to be executed when [[checkAccess()]] is called
* for this particular authorization item.
......@@ -263,27 +263,27 @@ abstract class Manager extends Component
abstract public function assign($userId, $itemName, $bizRule = null, $data = null);
/**
* Revokes an authorization assignment from a user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @return boolean whether removal is successful
*/
abstract public function revoke($userId, $itemName);
/**
* Revokes all authorization assignments from a user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @return boolean whether removal is successful
*/
abstract public function revokeAll($userId);
/**
* Returns a value indicating whether the item has been assigned to the user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @return boolean whether the item has been assigned to the user.
*/
abstract public function isAssigned($userId, $itemName);
/**
* Returns the item assignment information.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @return Assignment the item assignment information. Null is returned if
* the item is not assigned to the user.
......@@ -291,7 +291,7 @@ abstract class Manager extends Component
abstract public function getAssignment($userId, $itemName);
/**
* Returns the item assignments for the specified user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @return Item[] the item assignment information for the user. An empty array will be
* returned if there is no item assigned to the user.
*/
......
......@@ -60,7 +60,7 @@ class PhpManager extends Manager
* Performs access check for the specified user.
* @param mixed $userId the user ID. This can be either an integer or a string representing
* @param string $itemName the name of the operation that need access check
* the unique identifier of a user. See [[User::id]].
* the unique identifier of a user. See [[\yii\web\User::id]].
* @param array $params name-value pairs that would be passed to biz rules associated
* with the tasks and roles assigned to the user. A param with name 'userId' is added to
* this array, which holds the value of `$userId`.
......@@ -176,7 +176,7 @@ class PhpManager extends Manager
/**
* Assigns an authorization item to a user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @param string $bizRule the business rule to be executed when [[checkAccess()]] is called
* for this particular authorization item.
......@@ -203,7 +203,7 @@ class PhpManager extends Manager
/**
* Revokes an authorization assignment from a user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @return boolean whether removal is successful
*/
......@@ -219,7 +219,7 @@ class PhpManager extends Manager
/**
* Revokes all authorization assignments from a user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @return boolean whether removal is successful
*/
public function revokeAll($userId)
......@@ -235,7 +235,7 @@ class PhpManager extends Manager
/**
* Returns a value indicating whether the item has been assigned to the user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @return boolean whether the item has been assigned to the user.
*/
......@@ -246,7 +246,7 @@ class PhpManager extends Manager
/**
* Returns the item assignment information.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @param string $itemName the item name
* @return Assignment the item assignment information. Null is returned if
* the item is not assigned to the user.
......@@ -258,7 +258,7 @@ class PhpManager extends Manager
/**
* Returns the item assignments for the specified user.
* @param mixed $userId the user ID (see [[User::id]])
* @param mixed $userId the user ID (see [[\yii\web\User::id]])
* @return Assignment[] the item assignment information for the user. An empty array will be
* returned if there is no item assigned to the user.
*/
......
......@@ -23,7 +23,6 @@ abstract class BaseActiveFixture extends DbFixture implements \IteratorAggregate
/**
* @var string the AR model class associated with this fixture.
* @see tableName
*/
public $modelClass;
/**
......
......@@ -21,8 +21,6 @@ use yii\helpers\Html;
* with another attribute whose name is by appending "_repeat" to the source
* attribute name.
*
* The comparison can be either [[strict]] or not.
*
* CompareValidator supports different comparison operators, specified
* via the [[operator]] property.
*
......
......@@ -14,7 +14,7 @@ use yii\helpers\Json;
/**
* NumberValidator validates that the attribute value is a number.
*
* The format of the number must match the regular expression specified in [[pattern]].
* The format of the number must match the regular expression specified in [[integerPattern]] or [[numberPattern]].
* Optionally, you may configure the [[max]] and [[min]] properties to ensure the number
* is within certain range.
*
......
......@@ -22,7 +22,7 @@ use yii\base\NotSupportedException;
* be referenced using short names. They are listed as follows:
*
* - `boolean`: [[BooleanValidator]]
* - `captcha`: [[CaptchaValidator]]
* - `captcha`: [[\yii\captcha\CaptchaValidator]]
* - `compare`: [[CompareValidator]]
* - `date`: [[DateValidator]]
* - `default`: [[DefaultValueValidator]]
......@@ -257,7 +257,7 @@ class Validator extends Component
* containing a model form with this validator applied.
* @return string the client-side validation script. Null if the validator does not support
* client-side validation.
* @see \yii\web\ActiveForm::enableClientValidation
* @see \yii\widgets\ActiveForm::enableClientValidation
*/
public function clientValidateAttribute($object, $attribute, $view)
{
......
......@@ -16,7 +16,7 @@ use yii\helpers\FileHelper;
/**
* AssetManager manages asset bundles and asset publishing.
*
* AssetManager is configured as an application component in [[yii\web\Application]] by default.
* AssetManager is configured as an application component in [[\yii\web\Application]] by default.
* You can access that instance via `Yii::$app->assetManager`.
*
* You can modify its configuration by adding an array to your application config under `components`
......
......@@ -12,7 +12,7 @@ use yii\base\Object;
/**
* JsExpression marks a string as a JavaScript expression.
*
* When using [[yii\helpers\Json::encode()]] to encode a value, JsonExpression objects
* When using [[\yii\helpers\Json::encode()]] to encode a value, JsonExpression objects
* will be specially handled and encoded as a JavaScript expression instead of a string.
*
* @author Qiang Xue <qiang.xue@gmail.com>
......
......@@ -19,7 +19,7 @@ use yii\helpers\StringHelper;
* Also it provides an interface to retrieve request parameters from $_POST, $_GET, $_COOKIES and REST
* parameters sent via other HTTP methods like PUT or DELETE.
*
* Request is configured as an application component in [[yii\web\Application]] by default.
* Request is configured as an application component in [[\yii\web\Application]] by default.
* You can access that instance via `Yii::$app->request`.
*
* @property string $absoluteUrl The currently requested absolute URL. This property is read-only.
......
......@@ -22,7 +22,7 @@ use yii\helpers\StringHelper;
* It holds the [[headers]], [[cookies]] and [[content]] that is to be sent to the client.
* It also controls the HTTP [[statusCode|status code]].
*
* Response is configured as an application component in [[yii\web\Application]] by default.
* Response is configured as an application component in [[\yii\web\Application]] by default.
* You can access that instance via `Yii::$app->response`.
*
* You can modify its configuration by adding an array to your application config under `components`
......
......@@ -14,7 +14,7 @@ use yii\caching\Cache;
/**
* UrlManager handles HTTP request parsing and creation of URLs based on a set of rules.
*
* UrlManager is configured as an application component in [[yii\base\Application]] by default.
* UrlManager is configured as an application component in [[\yii\base\Application]] by default.
* You can access that instance via `Yii::$app->urlManager`.
*
* You can modify its configuration by adding an array to your application config under `components`
......
......@@ -20,7 +20,7 @@ use yii\base\InvalidConfigException;
* User works with a class implementing the [[IdentityInterface]]. This class implements
* the actual user authentication logic and is often backed by a user database table.
*
* User is configured as an application component in [[yii\web\Application]] by default.
* User is configured as an application component in [[\yii\web\Application]] by default.
* You can access that instance via `Yii::$app->user`.
*
* You can modify its configuration by adding an array to your application config under `components`
......
......@@ -16,7 +16,7 @@ use yii\base\InvalidConfigException;
*
* View provides a set of methods (e.g. [[render()]]) for rendering purpose.
*
* View is configured as an application component in [[yii\base\Application]] by default.
* View is configured as an application component in [[\yii\base\Application]] by default.
* You can access that instance via `Yii::$app->view`.
*
* You can modify its configuration by adding an array to your application config under `components`
......
......@@ -33,7 +33,7 @@ class ActiveForm extends Widget
public $method = 'post';
/**
* @var array the HTML attributes (name-value pairs) for the form tag.
* The values will be HTML-encoded using [[Html::encode()]].
* The values will be HTML-encoded using [[\yii\helpers\Html::encode()]].
* If a value is null, the corresponding attribute will not be rendered.
*/
public $options = [];
......@@ -209,7 +209,7 @@ class ActiveForm extends Widget
* - footer: string, the footer HTML for the error summary.
*
* The rest of the options will be rendered as the attributes of the container tag. The values will
* be HTML-encoded using [[encode()]]. If a value is null, the corresponding attribute will not be rendered.
* be HTML-encoded using [[\yii\helpers\Html::encode()]]. If a value is null, the corresponding attribute will not be rendered.
* @return string the generated error summary
*/
public function errorSummary($models, $options = [])
......
......@@ -16,10 +16,6 @@ use yii\base\Widget;
class Block extends Widget
{
/**
* @var string the ID of this block.
*/
public $id;
/**
* @var boolean whether to render the block content in place. Defaults to false,
* meaning the captured block content will not be displayed.
*/
......@@ -36,7 +32,7 @@ class Block extends Widget
/**
* Ends recording a block.
* This method stops output buffering and saves the rendering result as a named block in the controller.
* This method stops output buffering and saves the rendering result as a named block in the view.
*/
public function run()
{
......@@ -44,6 +40,6 @@ class Block extends Widget
if ($this->renderInPlace) {
echo $block;
}
$this->view->blocks[$this->id] = $block;
$this->view->blocks[$this->getId()] = $block;
}
}
......@@ -34,7 +34,7 @@ class LinkSorter extends Widget
public $attributes;
/**
* @var array HTML attributes for the sorter container tag.
* See [[yii\helpers\Html::ul()]] for special attributes.
* See [[\yii\helpers\Html::ul()]] for special attributes.
*/
public $options = ['class' => 'sorter'];
......
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