Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
c98628d4
Commit
c98628d4
authored
May 11, 2013
by
resurtm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CS fixes.
parent
ea68bd3a
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
72 additions
and
71 deletions
+72
-71
Controller.php
yii/base/Controller.php
+1
-1
Dictionary.php
yii/base/Dictionary.php
+1
-1
Model.php
yii/base/Model.php
+8
-8
Vector.php
yii/base/Vector.php
+1
-1
View.php
yii/base/View.php
+1
-1
DbDependency.php
yii/caching/DbDependency.php
+2
-2
MemCache.php
yii/caching/MemCache.php
+10
-10
AppController.php
yii/console/controllers/AppController.php
+2
-2
ActiveRecord.php
yii/db/ActiveRecord.php
+5
-5
Command.php
yii/db/Command.php
+7
-7
Connection.php
yii/db/Connection.php
+1
-1
Migration.php
yii/db/Migration.php
+6
-5
Query.php
yii/db/Query.php
+13
-13
QueryBuilder.php
yii/db/QueryBuilder.php
+5
-5
Manager.php
yii/rbac/Manager.php
+6
-6
Pagination.php
yii/web/Pagination.php
+1
-1
UrlRule.php
yii/web/UrlRule.php
+1
-1
ContentDecorator.php
yii/widgets/ContentDecorator.php
+1
-1
No files found.
yii/base/Controller.php
View file @
c98628d4
...
@@ -278,7 +278,7 @@ class Controller extends Component
...
@@ -278,7 +278,7 @@ class Controller extends Component
* Child classes may override this method to throw exceptions when there are missing and/or unknown parameters.
* Child classes may override this method to throw exceptions when there are missing and/or unknown parameters.
* @param Action $action the currently requested action
* @param Action $action the currently requested action
* @param array $missingParams the names of the missing parameters
* @param array $missingParams the names of the missing parameters
* @param array $unknownParams the unknown parameters (name
=>
value)
* @param array $unknownParams the unknown parameters (name
=>
value)
*/
*/
public
function
validateActionParams
(
$action
,
$missingParams
,
$unknownParams
)
public
function
validateActionParams
(
$action
,
$missingParams
,
$unknownParams
)
{
{
...
...
yii/base/Dictionary.php
View file @
c98628d4
...
@@ -24,7 +24,7 @@ use yii\helpers\ArrayHelper;
...
@@ -24,7 +24,7 @@ use yii\helpers\ArrayHelper;
* $dictionary[$key] = $value; // add a key-value pair
* $dictionary[$key] = $value; // add a key-value pair
* unset($dictionary[$key]); // remove the value with the specified key
* unset($dictionary[$key]); // remove the value with the specified key
* if (isset($dictionary[$key])) // if the dictionary contains the key
* if (isset($dictionary[$key])) // if the dictionary contains the key
* foreach ($dictionary as $key
=>
$value) // traverse the items in the dictionary
* foreach ($dictionary as $key
=>
$value) // traverse the items in the dictionary
* $n = count($dictionary); // returns the number of items in the dictionary
* $n = count($dictionary); // returns the number of items in the dictionary
* ~~~
* ~~~
*
*
...
...
yii/base/Model.php
View file @
c98628d4
...
@@ -33,7 +33,7 @@ use yii\validators\Validator;
...
@@ -33,7 +33,7 @@ use yii\validators\Validator;
* @property Vector $validators All the validators declared in the model.
* @property Vector $validators All the validators declared in the model.
* @property array $activeValidators The validators applicable to the current [[scenario]].
* @property array $activeValidators The validators applicable to the current [[scenario]].
* @property array $errors Errors for all attributes or the specified attribute. Empty array is returned if no error.
* @property array $errors Errors for all attributes or the specified attribute. Empty array is returned if no error.
* @property array $attributes Attribute values (name
=>
value).
* @property array $attributes Attribute values (name
=>
value).
* @property string $scenario The scenario that this model is in.
* @property string $scenario The scenario that this model is in.
*
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
...
@@ -76,7 +76,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
...
@@ -76,7 +76,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
* array(
* array(
* 'attribute list',
* 'attribute list',
* 'validator type',
* 'validator type',
* 'on'
=>
'scenario name',
* 'on'
=>
'scenario name',
* ...other parameters...
* ...other parameters...
* )
* )
* ~~~
* ~~~
...
@@ -109,11 +109,11 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
...
@@ -109,11 +109,11 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
* // built-in "required" validator
* // built-in "required" validator
* array('username', 'required'),
* array('username', 'required'),
* // built-in "length" validator customized with "min" and "max" properties
* // built-in "length" validator customized with "min" and "max" properties
* array('username', 'length', 'min'
=>3, 'max'=>
12),
* array('username', 'length', 'min'
=> 3, 'max' =>
12),
* // built-in "compare" validator that is used in "register" scenario only
* // built-in "compare" validator that is used in "register" scenario only
* array('password', 'compare', 'compareAttribute'
=>'password2', 'on'=>
'register'),
* array('password', 'compare', 'compareAttribute'
=> 'password2', 'on' =>
'register'),
* // an inline validator defined via the "authenticate()" method in the model class
* // an inline validator defined via the "authenticate()" method in the model class
* array('password', 'authenticate', 'on'
=>
'login'),
* array('password', 'authenticate', 'on'
=>
'login'),
* // a validator of class "CaptchaValidator"
* // a validator of class "CaptchaValidator"
* array('captcha', 'CaptchaValidator'),
* array('captcha', 'CaptchaValidator'),
* );
* );
...
@@ -220,7 +220,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
...
@@ -220,7 +220,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
* Note, in order to inherit labels defined in the parent class, a child class needs to
* Note, in order to inherit labels defined in the parent class, a child class needs to
* merge the parent labels with child labels using functions such as `array_merge()`.
* merge the parent labels with child labels using functions such as `array_merge()`.
*
*
* @return array attribute labels (name
=>
label)
* @return array attribute labels (name
=>
label)
* @see generateAttributeLabel
* @see generateAttributeLabel
*/
*/
public
function
attributeLabels
()
public
function
attributeLabels
()
...
@@ -511,7 +511,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
...
@@ -511,7 +511,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
* Defaults to null, meaning all attributes listed in [[attributes()]] will be returned.
* Defaults to null, meaning all attributes listed in [[attributes()]] will be returned.
* If it is an array, only the attributes in the array will be returned.
* If it is an array, only the attributes in the array will be returned.
* @param array $except list of attributes whose value should NOT be returned.
* @param array $except list of attributes whose value should NOT be returned.
* @return array attribute values (name
=>
value).
* @return array attribute values (name
=>
value).
*/
*/
public
function
getAttributes
(
$names
=
null
,
$except
=
array
())
public
function
getAttributes
(
$names
=
null
,
$except
=
array
())
{
{
...
@@ -531,7 +531,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
...
@@ -531,7 +531,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
/**
/**
* Sets the attribute values in a massive way.
* Sets the attribute values in a massive way.
* @param array $values attribute values (name
=>
value) to be assigned to the model.
* @param array $values attribute values (name
=>
value) to be assigned to the model.
* @param boolean $safeOnly whether the assignments should only be done to the safe attributes.
* @param boolean $safeOnly whether the assignments should only be done to the safe attributes.
* A safe attribute is one that is associated with a validation rule in the current [[scenario]].
* A safe attribute is one that is associated with a validation rule in the current [[scenario]].
* @see safeAttributes()
* @see safeAttributes()
...
...
yii/base/Vector.php
View file @
c98628d4
...
@@ -24,7 +24,7 @@ namespace yii\base;
...
@@ -24,7 +24,7 @@ namespace yii\base;
* $vector[$index] = $item; // set new item at $index
* $vector[$index] = $item; // set new item at $index
* unset($vector[$index]); // remove the item at $index
* unset($vector[$index]); // remove the item at $index
* if (isset($vector[$index])) // if the vector has an item at $index
* if (isset($vector[$index])) // if the vector has an item at $index
* foreach ($vector as $index
=>
$item) // traverse each item in the vector
* foreach ($vector as $index
=>
$item) // traverse each item in the vector
* $n = count($vector); // count the number of items
* $n = count($vector); // count the number of items
* ~~~
* ~~~
*
*
...
...
yii/base/View.php
View file @
c98628d4
...
@@ -475,7 +475,7 @@ class View extends Component
...
@@ -475,7 +475,7 @@ class View extends Component
*
*
* @param string $viewFile the view file that will be used to decorate the content enclosed by this widget.
* @param string $viewFile the view file that will be used to decorate the content enclosed by this widget.
* This can be specified as either the view file path or path alias.
* This can be specified as either the view file path or path alias.
* @param array $params the variables (name
=>
value) to be extracted and made available in the decorative view.
* @param array $params the variables (name
=>
value) to be extracted and made available in the decorative view.
* @return \yii\widgets\ContentDecorator the ContentDecorator widget instance
* @return \yii\widgets\ContentDecorator the ContentDecorator widget instance
* @see \yii\widgets\ContentDecorator
* @see \yii\widgets\ContentDecorator
*/
*/
...
...
yii/caching/DbDependency.php
View file @
c98628d4
...
@@ -32,14 +32,14 @@ class DbDependency extends Dependency
...
@@ -32,14 +32,14 @@ class DbDependency extends Dependency
*/
*/
public
$sql
;
public
$sql
;
/**
/**
* @var array the parameters (name
=>
value) to be bound to the SQL statement specified by [[sql]].
* @var array the parameters (name
=>
value) to be bound to the SQL statement specified by [[sql]].
*/
*/
public
$params
;
public
$params
;
/**
/**
* Constructor.
* Constructor.
* @param string $sql the SQL query whose result is used to determine if the dependency has been changed.
* @param string $sql the SQL query whose result is used to determine if the dependency has been changed.
* @param array $params the parameters (name
=>
value) to be bound to the SQL statement specified by [[sql]].
* @param array $params the parameters (name
=>
value) to be bound to the SQL statement specified by [[sql]].
* @param array $config name-value pairs that will be used to initialize the object properties
* @param array $config name-value pairs that will be used to initialize the object properties
*/
*/
public
function
__construct
(
$sql
,
$params
=
array
(),
$config
=
array
())
public
function
__construct
(
$sql
,
$params
=
array
(),
$config
=
array
())
...
...
yii/caching/MemCache.php
View file @
c98628d4
...
@@ -30,19 +30,19 @@ use yii\base\InvalidConfigException;
...
@@ -30,19 +30,19 @@ use yii\base\InvalidConfigException;
*
*
* ~~~
* ~~~
* array(
* array(
* 'components'
=>
array(
* 'components'
=>
array(
* 'cache'
=>
array(
* 'cache'
=>
array(
* 'class'
=>
'MemCache',
* 'class'
=>
'MemCache',
* 'servers'
=>
array(
* 'servers'
=>
array(
* array(
* array(
* 'host'
=>
'server1',
* 'host'
=>
'server1',
* 'port'
=>
11211,
* 'port'
=>
11211,
* 'weight'
=>
60,
* 'weight'
=>
60,
* ),
* ),
* array(
* array(
* 'host'
=>
'server2',
* 'host'
=>
'server2',
* 'port'
=>
11211,
* 'port'
=>
11211,
* 'weight'
=>
40,
* 'weight'
=>
40,
* ),
* ),
* ),
* ),
* ),
* ),
...
...
yii/console/controllers/AppController.php
View file @
c98628d4
...
@@ -204,7 +204,7 @@ class AppController extends Controller
...
@@ -204,7 +204,7 @@ class AppController extends Controller
/**
/**
* Copies a list of files from one place to another.
* Copies a list of files from one place to another.
* @param array $fileList the list of files to be copied (name
=>
spec).
* @param array $fileList the list of files to be copied (name
=>
spec).
* The array keys are names displayed during the copy process, and array values are specifications
* The array keys are names displayed during the copy process, and array values are specifications
* for files to be copied. Each array value must be an array of the following structure:
* for files to be copied. Each array value must be an array of the following structure:
* <ul>
* <ul>
...
@@ -288,7 +288,7 @@ class AppController extends Controller
...
@@ -288,7 +288,7 @@ class AppController extends Controller
* @param array $ignoreFiles list of the names of files that should
* @param array $ignoreFiles list of the names of files that should
* be ignored in list building process.
* be ignored in list building process.
* @param array $renameMap hash array of file names that should be
* @param array $renameMap hash array of file names that should be
* renamed. Example value: array('1.old.txt'
=>
'2.new.txt').
* renamed. Example value: array('1.old.txt'
=>
'2.new.txt').
* @return array the file list (see {@link copyFiles})
* @return array the file list (see {@link copyFiles})
*/
*/
protected
function
buildFileList
(
$sourceDir
,
$targetDir
,
$baseDir
=
''
,
$ignoreFiles
=
array
(),
$renameMap
=
array
())
protected
function
buildFileList
(
$sourceDir
,
$targetDir
,
$baseDir
=
''
,
$ignoreFiles
=
array
(),
$renameMap
=
array
())
...
...
yii/db/ActiveRecord.php
View file @
c98628d4
...
@@ -169,7 +169,7 @@ class ActiveRecord extends Model
...
@@ -169,7 +169,7 @@ class ActiveRecord extends Model
* @param array $attributes attribute values (name-value pairs) to be saved into the table
* @param array $attributes attribute values (name-value pairs) to be saved into the table
* @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* Please refer to [[Query::where()]] on how to specify this parameter.
* Please refer to [[Query::where()]] on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @return integer the number of rows updated
* @return integer the number of rows updated
*/
*/
public
static
function
updateAll
(
$attributes
,
$condition
=
''
,
$params
=
array
())
public
static
function
updateAll
(
$attributes
,
$condition
=
''
,
$params
=
array
())
...
@@ -191,7 +191,7 @@ class ActiveRecord extends Model
...
@@ -191,7 +191,7 @@ class ActiveRecord extends Model
* Use negative values if you want to decrement the counters.
* Use negative values if you want to decrement the counters.
* @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
* Please refer to [[Query::where()]] on how to specify this parameter.
* Please refer to [[Query::where()]] on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* Do not name the parameters as `:bp0`, `:bp1`, etc., because they are used internally by this method.
* Do not name the parameters as `:bp0`, `:bp1`, etc., because they are used internally by this method.
* @return integer the number of rows updated
* @return integer the number of rows updated
*/
*/
...
@@ -219,7 +219,7 @@ class ActiveRecord extends Model
...
@@ -219,7 +219,7 @@ class ActiveRecord extends Model
*
*
* @param string|array $condition the conditions that will be put in the WHERE part of the DELETE SQL.
* @param string|array $condition the conditions that will be put in the WHERE part of the DELETE SQL.
* Please refer to [[Query::where()]] on how to specify this parameter.
* Please refer to [[Query::where()]] on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @return integer the number of rows deleted
* @return integer the number of rows deleted
*/
*/
public
static
function
deleteAll
(
$condition
=
''
,
$params
=
array
())
public
static
function
deleteAll
(
$condition
=
''
,
$params
=
array
())
...
@@ -1014,7 +1014,7 @@ class ActiveRecord extends Model
...
@@ -1014,7 +1014,7 @@ class ActiveRecord extends Model
* @param boolean $asArray whether to return the primary key value as an array. If true,
* @param boolean $asArray whether to return the primary key value as an array. If true,
* the return value will be an array with column names as keys and column values as values.
* the return value will be an array with column names as keys and column values as values.
* Note that for composite primary keys, an array will always be returned regardless of this parameter value.
* Note that for composite primary keys, an array will always be returned regardless of this parameter value.
* @return mixed the primary key value. An array (column name
=>
column value) is returned if the primary key
* @return mixed the primary key value. An array (column name
=>
column value) is returned if the primary key
* is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
* is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
* the key value is null).
* the key value is null).
*/
*/
...
@@ -1040,7 +1040,7 @@ class ActiveRecord extends Model
...
@@ -1040,7 +1040,7 @@ class ActiveRecord extends Model
* @param boolean $asArray whether to return the primary key value as an array. If true,
* @param boolean $asArray whether to return the primary key value as an array. If true,
* the return value will be an array with column name as key and column value as value.
* the return value will be an array with column name as key and column value as value.
* If this is false (default), a scalar value will be returned for non-composite primary key.
* If this is false (default), a scalar value will be returned for non-composite primary key.
* @return mixed the old primary key value. An array (column name
=>
column value) is returned if the primary key
* @return mixed the old primary key value. An array (column name
=>
column value) is returned if the primary key
* is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
* is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
* the key value is null).
* the key value is null).
*/
*/
...
...
yii/db/Command.php
View file @
c98628d4
...
@@ -69,7 +69,7 @@ class Command extends \yii\base\Component
...
@@ -69,7 +69,7 @@ class Command extends \yii\base\Component
*/
*/
private
$_sql
;
private
$_sql
;
/**
/**
* @var array the parameter log information (name
=>
value)
* @var array the parameter log information (name
=>
value)
*/
*/
private
$_params
=
array
();
private
$_params
=
array
();
...
@@ -220,9 +220,9 @@ class Command extends \yii\base\Component
...
@@ -220,9 +220,9 @@ class Command extends \yii\base\Component
* Note that the SQL data type of each value is determined by its PHP type.
* Note that the SQL data type of each value is determined by its PHP type.
* @param array $values the values to be bound. This must be given in terms of an associative
* @param array $values the values to be bound. This must be given in terms of an associative
* array with array keys being the parameter names, and array values the corresponding parameter values,
* array with array keys being the parameter names, and array values the corresponding parameter values,
* e.g. `array(':name'
=>'John', ':age'=>
25)`. By default, the PDO type of each value is determined
* e.g. `array(':name'
=> 'John', ':age' =>
25)`. By default, the PDO type of each value is determined
* by its PHP type. You may explicitly specify the PDO type by using an array: `array(value, type)`,
* by its PHP type. You may explicitly specify the PDO type by using an array: `array(value, type)`,
* e.g. `array(':name'
=>'John', ':profile'=>
array($profile, \PDO::PARAM_LOB))`.
* e.g. `array(':name'
=> 'John', ':profile' =>
array($profile, \PDO::PARAM_LOB))`.
* @return Command the current command being executed
* @return Command the current command being executed
*/
*/
public
function
bindValues
(
$values
)
public
function
bindValues
(
$values
)
...
@@ -465,7 +465,7 @@ class Command extends \yii\base\Component
...
@@ -465,7 +465,7 @@ class Command extends \yii\base\Component
* Note that the created command is not executed until [[execute()]] is called.
* Note that the created command is not executed until [[execute()]] is called.
*
*
* @param string $table the table that new rows will be inserted into.
* @param string $table the table that new rows will be inserted into.
* @param array $columns the column data (name
=>
value) to be inserted into the table.
* @param array $columns the column data (name
=>
value) to be inserted into the table.
* @return Command the command object itself
* @return Command the command object itself
*/
*/
public
function
insert
(
$table
,
$columns
)
public
function
insert
(
$table
,
$columns
)
...
@@ -515,7 +515,7 @@ class Command extends \yii\base\Component
...
@@ -515,7 +515,7 @@ class Command extends \yii\base\Component
* Note that the created command is not executed until [[execute()]] is called.
* Note that the created command is not executed until [[execute()]] is called.
*
*
* @param string $table the table to be updated.
* @param string $table the table to be updated.
* @param array $columns the column data (name
=>
value) to be updated.
* @param array $columns the column data (name
=>
value) to be updated.
* @param mixed $condition the condition that will be put in the WHERE part. Please
* @param mixed $condition the condition that will be put in the WHERE part. Please
* refer to [[Query::where()]] on how to specify condition.
* refer to [[Query::where()]] on how to specify condition.
* @param array $params the parameters to be bound to the command
* @param array $params the parameters to be bound to the command
...
@@ -555,7 +555,7 @@ class Command extends \yii\base\Component
...
@@ -555,7 +555,7 @@ class Command extends \yii\base\Component
/**
/**
* Creates a SQL command for creating a new DB table.
* Creates a SQL command for creating a new DB table.
*
*
* The columns in the new table should be specified as name-definition pairs (e.g. 'name'
=>
'string'),
* The columns in the new table should be specified as name-definition pairs (e.g. 'name'
=>
'string'),
* where name stands for a column name which will be properly quoted by the method, and definition
* where name stands for a column name which will be properly quoted by the method, and definition
* stands for the column type which can contain an abstract DB type.
* stands for the column type which can contain an abstract DB type.
* The method [[QueryBuilder::getColumnType()]] will be called
* The method [[QueryBuilder::getColumnType()]] will be called
...
@@ -566,7 +566,7 @@ class Command extends \yii\base\Component
...
@@ -566,7 +566,7 @@ class Command extends \yii\base\Component
* inserted into the generated SQL.
* inserted into the generated SQL.
*
*
* @param string $table the name of the table to be created. The name will be properly quoted by the method.
* @param string $table the name of the table to be created. The name will be properly quoted by the method.
* @param array $columns the columns (name
=>
definition) in the new table.
* @param array $columns the columns (name
=>
definition) in the new table.
* @param string $options additional SQL fragment that will be appended to the generated SQL.
* @param string $options additional SQL fragment that will be appended to the generated SQL.
* @return Command the command object itself
* @return Command the command object itself
*/
*/
...
...
yii/db/Connection.php
View file @
c98628d4
...
@@ -121,7 +121,7 @@ class Connection extends Component
...
@@ -121,7 +121,7 @@ class Connection extends Component
*/
*/
public
$password
=
''
;
public
$password
=
''
;
/**
/**
* @var array PDO attributes (name
=>
value) that should be set when calling [[open()]]
* @var array PDO attributes (name
=>
value) that should be set when calling [[open()]]
* to establish a DB connection. Please refer to the
* to establish a DB connection. Please refer to the
* [PHP manual](http://www.php.net/manual/en/function.PDO-setAttribute.php) for
* [PHP manual](http://www.php.net/manual/en/function.PDO-setAttribute.php) for
* details about available attributes.
* details about available attributes.
...
...
yii/db/Migration.php
View file @
c98628d4
...
@@ -132,7 +132,8 @@ class Migration extends \yii\base\Component
...
@@ -132,7 +132,8 @@ class Migration extends \yii\base\Component
* Executes a SQL statement.
* Executes a SQL statement.
* This method executes the specified SQL statement using [[db]].
* This method executes the specified SQL statement using [[db]].
* @param string $sql the SQL statement to be executed
* @param string $sql the SQL statement to be executed
* @param array $params input parameters (name=>value) for the SQL execution. See [[Command::execute()]] for more details.
* @param array $params input parameters (name => value) for the SQL execution.
* See [[Command::execute()]] for more details.
*/
*/
public
function
execute
(
$sql
,
$params
=
array
())
public
function
execute
(
$sql
,
$params
=
array
())
{
{
...
@@ -146,7 +147,7 @@ class Migration extends \yii\base\Component
...
@@ -146,7 +147,7 @@ class Migration extends \yii\base\Component
* Creates and executes an INSERT SQL statement.
* Creates and executes an INSERT SQL statement.
* The method will properly escape the column names, and bind the values to be inserted.
* The method will properly escape the column names, and bind the values to be inserted.
* @param string $table the table that new rows will be inserted into.
* @param string $table the table that new rows will be inserted into.
* @param array $columns the column data (name
=>
value) to be inserted into the table.
* @param array $columns the column data (name
=>
value) to be inserted into the table.
*/
*/
public
function
insert
(
$table
,
$columns
)
public
function
insert
(
$table
,
$columns
)
{
{
...
@@ -160,7 +161,7 @@ class Migration extends \yii\base\Component
...
@@ -160,7 +161,7 @@ class Migration extends \yii\base\Component
* Creates and executes an UPDATE SQL statement.
* Creates and executes an UPDATE SQL statement.
* The method will properly escape the column names and bind the values to be updated.
* The method will properly escape the column names and bind the values to be updated.
* @param string $table the table to be updated.
* @param string $table the table to be updated.
* @param array $columns the column data (name
=>
value) to be updated.
* @param array $columns the column data (name
=>
value) to be updated.
* @param mixed $condition the conditions that will be put in the WHERE part. Please
* @param mixed $condition the conditions that will be put in the WHERE part. Please
* refer to [[Query::where()]] on how to specify conditions.
* refer to [[Query::where()]] on how to specify conditions.
* @param array $params the parameters to be bound to the query.
* @param array $params the parameters to be bound to the query.
...
@@ -191,7 +192,7 @@ class Migration extends \yii\base\Component
...
@@ -191,7 +192,7 @@ class Migration extends \yii\base\Component
/**
/**
* Builds and executes a SQL statement for creating a new DB table.
* Builds and executes a SQL statement for creating a new DB table.
*
*
* The columns in the new table should be specified as name-definition pairs (e.g. 'name'
=>
'string'),
* The columns in the new table should be specified as name-definition pairs (e.g. 'name'
=>
'string'),
* where name stands for a column name which will be properly quoted by the method, and definition
* where name stands for a column name which will be properly quoted by the method, and definition
* stands for the column type which can contain an abstract DB type.
* stands for the column type which can contain an abstract DB type.
*
*
...
@@ -201,7 +202,7 @@ class Migration extends \yii\base\Component
...
@@ -201,7 +202,7 @@ class Migration extends \yii\base\Component
* put into the generated SQL.
* put into the generated SQL.
*
*
* @param string $table the name of the table to be created. The name will be properly quoted by the method.
* @param string $table the name of the table to be created. The name will be properly quoted by the method.
* @param array $columns the columns (name
=>
definition) in the new table.
* @param array $columns the columns (name
=>
definition) in the new table.
* @param string $options additional SQL fragment that will be appended to the generated SQL.
* @param string $options additional SQL fragment that will be appended to the generated SQL.
*/
*/
public
function
createTable
(
$table
,
$columns
,
$options
=
null
)
public
function
createTable
(
$table
,
$columns
,
$options
=
null
)
...
...
yii/db/Query.php
View file @
c98628d4
...
@@ -124,7 +124,7 @@ class Query extends \yii\base\Component
...
@@ -124,7 +124,7 @@ class Query extends \yii\base\Component
public
$union
;
public
$union
;
/**
/**
* @var array list of query parameter values indexed by parameter placeholders.
* @var array list of query parameter values indexed by parameter placeholders.
* For example, `array(':name'
=>'Dan', ':age'=>
31)`.
* For example, `array(':name'
=> 'Dan', ':age' =>
31)`.
*/
*/
public
$params
;
public
$params
;
...
@@ -257,7 +257,7 @@ class Query extends \yii\base\Component
...
@@ -257,7 +257,7 @@ class Query extends \yii\base\Component
* the `NOT LIKE` predicates.
* the `NOT LIKE` predicates.
*
*
* @param string|array $condition the conditions that should be put in the WHERE part.
* @param string|array $condition the conditions that should be put in the WHERE part.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @return Query the query object itself
* @return Query the query object itself
* @see andWhere()
* @see andWhere()
* @see orWhere()
* @see orWhere()
...
@@ -274,7 +274,7 @@ class Query extends \yii\base\Component
...
@@ -274,7 +274,7 @@ class Query extends \yii\base\Component
* The new condition and the existing one will be joined using the 'AND' operator.
* The new condition and the existing one will be joined using the 'AND' operator.
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @return Query the query object itself
* @return Query the query object itself
* @see where()
* @see where()
* @see orWhere()
* @see orWhere()
...
@@ -295,7 +295,7 @@ class Query extends \yii\base\Component
...
@@ -295,7 +295,7 @@ class Query extends \yii\base\Component
* The new condition and the existing one will be joined using the 'OR' operator.
* The new condition and the existing one will be joined using the 'OR' operator.
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @return Query the query object itself
* @return Query the query object itself
* @see where()
* @see where()
* @see andWhere()
* @see andWhere()
...
@@ -321,7 +321,7 @@ class Query extends \yii\base\Component
...
@@ -321,7 +321,7 @@ class Query extends \yii\base\Component
* (which means the table is given as a sub-query or DB expression).
* (which means the table is given as a sub-query or DB expression).
* @param string|array $on the join condition that should appear in the ON part.
* @param string|array $on the join condition that should appear in the ON part.
* Please refer to [[where()]] on how to specify this parameter.
* Please refer to [[where()]] on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @return Query the query object itself
* @return Query the query object itself
*/
*/
public
function
join
(
$type
,
$table
,
$on
=
''
,
$params
=
array
())
public
function
join
(
$type
,
$table
,
$on
=
''
,
$params
=
array
())
...
@@ -338,7 +338,7 @@ class Query extends \yii\base\Component
...
@@ -338,7 +338,7 @@ class Query extends \yii\base\Component
* (which means the table is given as a sub-query or DB expression).
* (which means the table is given as a sub-query or DB expression).
* @param string|array $on the join condition that should appear in the ON part.
* @param string|array $on the join condition that should appear in the ON part.
* Please refer to [[where()]] on how to specify this parameter.
* Please refer to [[where()]] on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @return Query the query object itself
* @return Query the query object itself
*/
*/
public
function
innerJoin
(
$table
,
$on
=
''
,
$params
=
array
())
public
function
innerJoin
(
$table
,
$on
=
''
,
$params
=
array
())
...
@@ -355,7 +355,7 @@ class Query extends \yii\base\Component
...
@@ -355,7 +355,7 @@ class Query extends \yii\base\Component
* (which means the table is given as a sub-query or DB expression).
* (which means the table is given as a sub-query or DB expression).
* @param string|array $on the join condition that should appear in the ON part.
* @param string|array $on the join condition that should appear in the ON part.
* Please refer to [[where()]] on how to specify this parameter.
* Please refer to [[where()]] on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query
* @param array $params the parameters (name
=>
value) to be bound to the query
* @return Query the query object itself
* @return Query the query object itself
*/
*/
public
function
leftJoin
(
$table
,
$on
=
''
,
$params
=
array
())
public
function
leftJoin
(
$table
,
$on
=
''
,
$params
=
array
())
...
@@ -372,7 +372,7 @@ class Query extends \yii\base\Component
...
@@ -372,7 +372,7 @@ class Query extends \yii\base\Component
* (which means the table is given as a sub-query or DB expression).
* (which means the table is given as a sub-query or DB expression).
* @param string|array $on the join condition that should appear in the ON part.
* @param string|array $on the join condition that should appear in the ON part.
* Please refer to [[where()]] on how to specify this parameter.
* Please refer to [[where()]] on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query
* @param array $params the parameters (name
=>
value) to be bound to the query
* @return Query the query object itself
* @return Query the query object itself
*/
*/
public
function
rightJoin
(
$table
,
$on
=
''
,
$params
=
array
())
public
function
rightJoin
(
$table
,
$on
=
''
,
$params
=
array
())
...
@@ -425,7 +425,7 @@ class Query extends \yii\base\Component
...
@@ -425,7 +425,7 @@ class Query extends \yii\base\Component
* Sets the HAVING part of the query.
* Sets the HAVING part of the query.
* @param string|array $condition the conditions to be put after HAVING.
* @param string|array $condition the conditions to be put after HAVING.
* Please refer to [[where()]] on how to specify this parameter.
* Please refer to [[where()]] on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @return Query the query object itself
* @return Query the query object itself
* @see andHaving()
* @see andHaving()
* @see orHaving()
* @see orHaving()
...
@@ -442,7 +442,7 @@ class Query extends \yii\base\Component
...
@@ -442,7 +442,7 @@ class Query extends \yii\base\Component
* The new condition and the existing one will be joined using the 'AND' operator.
* The new condition and the existing one will be joined using the 'AND' operator.
* @param string|array $condition the new HAVING condition. Please refer to [[where()]]
* @param string|array $condition the new HAVING condition. Please refer to [[where()]]
* on how to specify this parameter.
* on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @return Query the query object itself
* @return Query the query object itself
* @see having()
* @see having()
* @see orHaving()
* @see orHaving()
...
@@ -463,7 +463,7 @@ class Query extends \yii\base\Component
...
@@ -463,7 +463,7 @@ class Query extends \yii\base\Component
* The new condition and the existing one will be joined using the 'OR' operator.
* The new condition and the existing one will be joined using the 'OR' operator.
* @param string|array $condition the new HAVING condition. Please refer to [[where()]]
* @param string|array $condition the new HAVING condition. Please refer to [[where()]]
* on how to specify this parameter.
* on how to specify this parameter.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @param array $params the parameters (name
=>
value) to be bound to the query.
* @return Query the query object itself
* @return Query the query object itself
* @see having()
* @see having()
* @see andHaving()
* @see andHaving()
...
@@ -570,7 +570,7 @@ class Query extends \yii\base\Component
...
@@ -570,7 +570,7 @@ class Query extends \yii\base\Component
/**
/**
* Sets the parameters to be bound to the query.
* Sets the parameters to be bound to the query.
* @param array $params list of query parameter values indexed by parameter placeholders.
* @param array $params list of query parameter values indexed by parameter placeholders.
* For example, `array(':name'
=>'Dan', ':age'=>
31)`.
* For example, `array(':name'
=> 'Dan', ':age' =>
31)`.
* @return Query the query object itself
* @return Query the query object itself
* @see addParams()
* @see addParams()
*/
*/
...
@@ -583,7 +583,7 @@ class Query extends \yii\base\Component
...
@@ -583,7 +583,7 @@ class Query extends \yii\base\Component
/**
/**
* Adds additional parameters to be bound to the query.
* Adds additional parameters to be bound to the query.
* @param array $params list of query parameter values indexed by parameter placeholders.
* @param array $params list of query parameter values indexed by parameter placeholders.
* For example, `array(':name'
=>'Dan', ':age'=>
31)`.
* For example, `array(':name'
=> 'Dan', ':age' =>
31)`.
* @return Query the query object itself
* @return Query the query object itself
* @see params()
* @see params()
*/
*/
...
...
yii/db/QueryBuilder.php
View file @
c98628d4
...
@@ -88,7 +88,7 @@ class QueryBuilder extends \yii\base\Object
...
@@ -88,7 +88,7 @@ class QueryBuilder extends \yii\base\Object
* The method will properly escape the table and column names.
* The method will properly escape the table and column names.
*
*
* @param string $table the table that new rows will be inserted into.
* @param string $table the table that new rows will be inserted into.
* @param array $columns the column data (name
=>
value) to be inserted into the table.
* @param array $columns the column data (name
=>
value) to be inserted into the table.
* @param array $params the binding parameters that will be generated by this method.
* @param array $params the binding parameters that will be generated by this method.
* They should be bound to the DB command later.
* They should be bound to the DB command later.
* @return string the INSERT SQL
* @return string the INSERT SQL
...
@@ -156,7 +156,7 @@ class QueryBuilder extends \yii\base\Object
...
@@ -156,7 +156,7 @@ class QueryBuilder extends \yii\base\Object
* The method will properly escape the table and column names.
* The method will properly escape the table and column names.
*
*
* @param string $table the table to be updated.
* @param string $table the table to be updated.
* @param array $columns the column data (name
=>
value) to be updated.
* @param array $columns the column data (name
=>
value) to be updated.
* @param mixed $condition the condition that will be put in the WHERE part. Please
* @param mixed $condition the condition that will be put in the WHERE part. Please
* refer to [[Query::where()]] on how to specify condition.
* refer to [[Query::where()]] on how to specify condition.
* @param array $params the binding parameters that will be modified by this method
* @param array $params the binding parameters that will be modified by this method
...
@@ -211,7 +211,7 @@ class QueryBuilder extends \yii\base\Object
...
@@ -211,7 +211,7 @@ class QueryBuilder extends \yii\base\Object
/**
/**
* Builds a SQL statement for creating a new DB table.
* Builds a SQL statement for creating a new DB table.
*
*
* The columns in the new table should be specified as name-definition pairs (e.g. 'name'
=>
'string'),
* The columns in the new table should be specified as name-definition pairs (e.g. 'name'
=>
'string'),
* where name stands for a column name which will be properly quoted by the method, and definition
* where name stands for a column name which will be properly quoted by the method, and definition
* stands for the column type which can contain an abstract DB type.
* stands for the column type which can contain an abstract DB type.
* The [[getColumnType()]] method will be invoked to convert any abstract type into a physical one.
* The [[getColumnType()]] method will be invoked to convert any abstract type into a physical one.
...
@@ -230,7 +230,7 @@ class QueryBuilder extends \yii\base\Object
...
@@ -230,7 +230,7 @@ class QueryBuilder extends \yii\base\Object
* ~~~
* ~~~
*
*
* @param string $table the name of the table to be created. The name will be properly quoted by the method.
* @param string $table the name of the table to be created. The name will be properly quoted by the method.
* @param array $columns the columns (name
=>
definition) in the new table.
* @param array $columns the columns (name
=>
definition) in the new table.
* @param string $options additional SQL fragment that will be appended to the generated SQL.
* @param string $options additional SQL fragment that will be appended to the generated SQL.
* @return string the SQL statement for creating a new DB table.
* @return string the SQL statement for creating a new DB table.
*/
*/
...
@@ -734,7 +734,7 @@ class QueryBuilder extends \yii\base\Object
...
@@ -734,7 +734,7 @@ class QueryBuilder extends \yii\base\Object
}
else
{
}
else
{
throw
new
Exception
(
'Found unknown operator in query: '
.
$operator
);
throw
new
Exception
(
'Found unknown operator in query: '
.
$operator
);
}
}
}
else
{
// hash format: 'column1'
=>'value1', 'column2'=>
'value2', ...
}
else
{
// hash format: 'column1'
=> 'value1', 'column2' =>
'value2', ...
return
$this
->
buildHashCondition
(
$condition
,
$params
);
return
$this
->
buildHashCondition
(
$condition
,
$params
);
}
}
}
}
...
...
yii/rbac/Manager.php
View file @
c98628d4
...
@@ -33,9 +33,9 @@ use yii\base\InvalidParamException;
...
@@ -33,9 +33,9 @@ use yii\base\InvalidParamException;
* at appropriate places in the application code to check if the current user
* at appropriate places in the application code to check if the current user
* has the needed permission for an operation.
* has the needed permission for an operation.
*
*
* @property array $roles Roles (name
=>
Item).
* @property array $roles Roles (name
=>
Item).
* @property array $tasks Tasks (name
=>
Item).
* @property array $tasks Tasks (name
=>
Item).
* @property array $operations Operations (name
=>
Item).
* @property array $operations Operations (name
=>
Item).
*
*
* @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>
...
@@ -107,7 +107,7 @@ abstract class Manager extends Component
...
@@ -107,7 +107,7 @@ abstract class Manager extends Component
* This is a shortcut method to [[Manager::getItems()]].
* This is a shortcut method to [[Manager::getItems()]].
* @param mixed $userId the user ID. If not null, only the roles directly assigned to the user
* @param mixed $userId the user ID. If not null, only the roles directly assigned to the user
* will be returned. Otherwise, all roles will be returned.
* will be returned. Otherwise, all roles will be returned.
* @return Item[] roles (name
=>
AuthItem)
* @return Item[] roles (name
=>
AuthItem)
*/
*/
public
function
getRoles
(
$userId
=
null
)
public
function
getRoles
(
$userId
=
null
)
{
{
...
@@ -119,7 +119,7 @@ abstract class Manager extends Component
...
@@ -119,7 +119,7 @@ abstract class Manager extends Component
* This is a shortcut method to [[Manager::getItems()]].
* This is a shortcut method to [[Manager::getItems()]].
* @param mixed $userId the user ID. If not null, only the tasks directly assigned to the user
* @param mixed $userId the user ID. If not null, only the tasks directly assigned to the user
* will be returned. Otherwise, all tasks will be returned.
* will be returned. Otherwise, all tasks will be returned.
* @return Item[] tasks (name
=>
AuthItem)
* @return Item[] tasks (name
=>
AuthItem)
*/
*/
public
function
getTasks
(
$userId
=
null
)
public
function
getTasks
(
$userId
=
null
)
{
{
...
@@ -131,7 +131,7 @@ abstract class Manager extends Component
...
@@ -131,7 +131,7 @@ abstract class Manager extends Component
* This is a shortcut method to [[Manager::getItems()]].
* This is a shortcut method to [[Manager::getItems()]].
* @param mixed $userId the user ID. If not null, only the operations directly assigned to the user
* @param mixed $userId the user ID. If not null, only the operations directly assigned to the user
* will be returned. Otherwise, all operations will be returned.
* will be returned. Otherwise, all operations will be returned.
* @return Item[] operations (name
=>
AuthItem)
* @return Item[] operations (name
=>
AuthItem)
*/
*/
public
function
getOperations
(
$userId
=
null
)
public
function
getOperations
(
$userId
=
null
)
{
{
...
...
yii/web/Pagination.php
View file @
c98628d4
...
@@ -80,7 +80,7 @@ class Pagination extends \yii\base\Object
...
@@ -80,7 +80,7 @@ class Pagination extends \yii\base\Object
*/
*/
public
$route
;
public
$route
;
/**
/**
* @var array parameters (name
=>
value) that should be used to obtain the current page number
* @var array parameters (name
=>
value) that should be used to obtain the current page number
* and to create new pagination URLs. If not set, $_GET will be used instead.
* and to create new pagination URLs. If not set, $_GET will be used instead.
*
*
* The array element indexed by [[pageVar]] is considered to be the current page number.
* The array element indexed by [[pageVar]] is considered to be the current page number.
...
...
yii/web/UrlRule.php
View file @
c98628d4
...
@@ -36,7 +36,7 @@ class UrlRule extends Object
...
@@ -36,7 +36,7 @@ class UrlRule extends Object
*/
*/
public
$route
;
public
$route
;
/**
/**
* @var array the default GET parameters (name
=>
value) that this rule provides.
* @var array the default GET parameters (name
=>
value) that this rule provides.
* When this rule is used to parse the incoming request, the values declared in this property
* When this rule is used to parse the incoming request, the values declared in this property
* will be injected into $_GET.
* will be injected into $_GET.
*/
*/
...
...
yii/widgets/ContentDecorator.php
View file @
c98628d4
...
@@ -22,7 +22,7 @@ class ContentDecorator extends Widget
...
@@ -22,7 +22,7 @@ class ContentDecorator extends Widget
*/
*/
public
$viewFile
;
public
$viewFile
;
/**
/**
* @var array the parameters (name
=>
value) to be extracted and made available in the decorative view.
* @var array the parameters (name
=>
value) to be extracted and made available in the decorative view.
*/
*/
public
$params
=
array
();
public
$params
=
array
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment