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
02622b6f
Commit
02622b6f
authored
Oct 14, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
phpdoc fixes and additions
parent
715b4475
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
51 additions
and
3 deletions
+51
-3
AssetController.php
framework/console/controllers/AssetController.php
+1
-0
BaseMigrateController.php
framework/console/controllers/BaseMigrateController.php
+2
-0
FixtureController.php
framework/console/controllers/FixtureController.php
+6
-2
MessageController.php
framework/console/controllers/MessageController.php
+1
-0
ActiveRelationTrait.php
framework/db/ActiveRelationTrait.php
+9
-0
AccessRule.php
framework/filters/AccessRule.php
+1
-1
Formatter.php
framework/i18n/Formatter.php
+10
-0
DateValidator.php
framework/validators/DateValidator.php
+6
-0
AssetManager.php
framework/web/AssetManager.php
+15
-0
No files found.
framework/console/controllers/AssetController.php
View file @
02622b6f
...
@@ -601,6 +601,7 @@ EOD;
...
@@ -601,6 +601,7 @@ EOD;
/**
/**
* Creates template of configuration file for [[actionCompress]].
* Creates template of configuration file for [[actionCompress]].
* @param string $configFile output file name.
* @param string $configFile output file name.
* @return int CLI exit code
* @throws \yii\console\Exception on failure.
* @throws \yii\console\Exception on failure.
*/
*/
public
function
actionTemplate
(
$configFile
)
public
function
actionTemplate
(
$configFile
)
...
...
framework/console/controllers/BaseMigrateController.php
View file @
02622b6f
...
@@ -302,6 +302,7 @@ abstract class BaseMigrateController extends Controller
...
@@ -302,6 +302,7 @@ abstract class BaseMigrateController extends Controller
*
*
* @param string $version the version at which the migration history should be marked.
* @param string $version the version at which the migration history should be marked.
* This can be either the timestamp or the full name of the migration.
* This can be either the timestamp or the full name of the migration.
* @return int CLI exit code
* @throws Exception if the version argument is invalid or the version cannot be found.
* @throws Exception if the version argument is invalid or the version cannot be found.
*/
*/
public
function
actionMark
(
$version
)
public
function
actionMark
(
$version
)
...
@@ -561,6 +562,7 @@ abstract class BaseMigrateController extends Controller
...
@@ -561,6 +562,7 @@ abstract class BaseMigrateController extends Controller
/**
/**
* Migrates to the certain version.
* Migrates to the certain version.
* @param string $version name in the full format.
* @param string $version name in the full format.
* @return int CLI exit code
* @throws Exception if the provided version cannot be found.
* @throws Exception if the provided version cannot be found.
*/
*/
protected
function
migrateToVersion
(
$version
)
protected
function
migrateToVersion
(
$version
)
...
...
framework/console/controllers/FixtureController.php
View file @
02622b6f
...
@@ -234,6 +234,8 @@ class FixtureController extends Controller
...
@@ -234,6 +234,8 @@ class FixtureController extends Controller
/**
/**
* Notifies user that there are no fixtures to load according input conditions
* Notifies user that there are no fixtures to load according input conditions
* @param array $foundFixtures array of found fixtures
* @param array $except array of names of fixtures that should not be loaded
*/
*/
public
function
notifyNothingToLoad
(
$foundFixtures
,
$except
)
public
function
notifyNothingToLoad
(
$foundFixtures
,
$except
)
{
{
...
@@ -254,6 +256,8 @@ class FixtureController extends Controller
...
@@ -254,6 +256,8 @@ class FixtureController extends Controller
/**
/**
* Notifies user that there are no fixtures to unload according input conditions
* Notifies user that there are no fixtures to unload according input conditions
* @param array $foundFixtures array of found fixtures
* @param array $except array of names of fixtures that should not be loaded
*/
*/
public
function
notifyNothingToUnload
(
$foundFixtures
,
$except
)
public
function
notifyNothingToUnload
(
$foundFixtures
,
$except
)
{
{
...
@@ -437,11 +441,11 @@ class FixtureController extends Controller
...
@@ -437,11 +441,11 @@ class FixtureController extends Controller
* ~~~
* ~~~
* [
* [
* 'apply' => [
* 'apply' => [
*
User
,
*
'User'
,
* ...
* ...
* ],
* ],
* 'except' => [
* 'except' => [
*
Custom
,
*
'Custom'
,
* ...
* ...
* ],
* ],
* ]
* ]
...
...
framework/console/controllers/MessageController.php
View file @
02622b6f
...
@@ -50,6 +50,7 @@ class MessageController extends Controller
...
@@ -50,6 +50,7 @@ class MessageController extends Controller
* you may use this configuration file with the "extract" command.
* you may use this configuration file with the "extract" command.
*
*
* @param string $filePath output file name or alias.
* @param string $filePath output file name or alias.
* @return int CLI exit code
* @throws Exception on failure.
* @throws Exception on failure.
*/
*/
public
function
actionConfig
(
$filePath
)
public
function
actionConfig
(
$filePath
)
...
...
framework/db/ActiveRelationTrait.php
View file @
02622b6f
...
@@ -391,6 +391,15 @@ trait ActiveRelationTrait
...
@@ -391,6 +391,15 @@ trait ActiveRelationTrait
return
$buckets
;
return
$buckets
;
}
}
/**
* Indexes buckets by column name.
*
* @param array $buckets
* @var string|callable $column the name of the column by which the query results should be indexed by.
* This can also be a callable (e.g. anonymous function) that returns the index value based on the given row data.
* @return array
*/
private
function
indexBuckets
(
$buckets
,
$indexBy
)
private
function
indexBuckets
(
$buckets
,
$indexBy
)
{
{
$result
=
[];
$result
=
[];
...
...
framework/filters/AccessRule.php
View file @
02622b6f
...
@@ -123,7 +123,7 @@ class AccessRule extends Component
...
@@ -123,7 +123,7 @@ class AccessRule extends Component
}
}
/**
/**
* @param Controller $controller the controller
* @param
\yii\base\
Controller $controller the controller
* @return boolean whether the rule applies to the controller
* @return boolean whether the rule applies to the controller
*/
*/
protected
function
matchController
(
$controller
)
protected
function
matchController
(
$controller
)
...
...
framework/i18n/Formatter.php
View file @
02622b6f
...
@@ -1022,6 +1022,16 @@ class Formatter extends Component
...
@@ -1022,6 +1022,16 @@ class Formatter extends Component
}
}
}
}
/**
* Given the value in bytes formats number part of the human readable form.
*
* @param string|integer|float $value value in bytes to be formatted.
* @param integer $decimals the number of digits after the decimal point
* @param array $options optional configuration for the number formatter. This parameter will be merged with [[numberFormatterOptions]].
* @param array $textOptions optional configuration for the number formatter. This parameter will be merged with [[numberFormatterTextOptions]].
* @return array [parameters for Yii::t containing formatted number, internal position of size unit]
*/
private
function
formatSizeNumber
(
$value
,
$decimals
,
$options
,
$textOptions
)
private
function
formatSizeNumber
(
$value
,
$decimals
,
$options
,
$textOptions
)
{
{
if
(
is_string
(
$value
)
&&
is_numeric
(
$value
))
{
if
(
is_string
(
$value
)
&&
is_numeric
(
$value
))
{
...
...
framework/validators/DateValidator.php
View file @
02622b6f
...
@@ -113,6 +113,12 @@ class DateValidator extends Validator
...
@@ -113,6 +113,12 @@ class DateValidator extends Validator
return
$this
->
parseDateValue
(
$value
)
===
false
?
[
$this
->
message
,
[]]
:
null
;
return
$this
->
parseDateValue
(
$value
)
===
false
?
[
$this
->
message
,
[]]
:
null
;
}
}
/**
* Parses date string into UNIX timestamp
*
* @param string $value string representing date
* @return boolean|integer UNIX timestamp or false on failure
*/
protected
function
parseDateValue
(
$value
)
protected
function
parseDateValue
(
$value
)
{
{
if
(
is_array
(
$value
))
{
if
(
is_array
(
$value
))
{
...
...
framework/web/AssetManager.php
View file @
02622b6f
...
@@ -201,6 +201,15 @@ class AssetManager extends Component
...
@@ -201,6 +201,15 @@ class AssetManager extends Component
}
}
}
}
/**
* Loads asset bundle class by name
*
* @param string $name bundle name
* @param array $config bundle object configuration
* @param boolean $publish if bundle should be published
* @return AssetBundle
* @throws InvalidConfigException if configuration isn't valid
*/
protected
function
loadBundle
(
$name
,
$config
=
[],
$publish
=
true
)
protected
function
loadBundle
(
$name
,
$config
=
[],
$publish
=
true
)
{
{
if
(
!
isset
(
$config
[
'class'
]))
{
if
(
!
isset
(
$config
[
'class'
]))
{
...
@@ -214,6 +223,12 @@ class AssetManager extends Component
...
@@ -214,6 +223,12 @@ class AssetManager extends Component
return
$bundle
;
return
$bundle
;
}
}
/**
* Loads dummy bundle by name
*
* @param string $name
* @return AssetBundle
*/
protected
function
loadDummyBundle
(
$name
)
protected
function
loadDummyBundle
(
$name
)
{
{
if
(
!
isset
(
$this
->
_dummyBundles
[
$name
]))
{
if
(
!
isset
(
$this
->
_dummyBundles
[
$name
]))
{
...
...
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