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
1641e057
Commit
1641e057
authored
May 20, 2014
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`VarDumper::export()` applied over framework.
parent
2b26dd32
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
10 deletions
+14
-10
Generator.php
extensions/gii/Generator.php
+2
-3
ErrorHandler.php
framework/base/ErrorHandler.php
+2
-1
AssetController.php
framework/console/controllers/AssetController.php
+4
-3
MessageController.php
framework/console/controllers/MessageController.php
+2
-1
PhpManager.php
framework/rbac/PhpManager.php
+2
-1
ErrorHandler.php
framework/web/ErrorHandler.php
+2
-1
No files found.
extensions/gii/Generator.php
View file @
1641e057
...
@@ -11,6 +11,7 @@ use Yii;
...
@@ -11,6 +11,7 @@ use Yii;
use
ReflectionClass
;
use
ReflectionClass
;
use
yii\base\InvalidConfigException
;
use
yii\base\InvalidConfigException
;
use
yii\base\Model
;
use
yii\base\Model
;
use
yii\helpers\VarDumper
;
use
yii\web\View
;
use
yii\web\View
;
/**
/**
...
@@ -496,9 +497,7 @@ abstract class Generator extends Model
...
@@ -496,9 +497,7 @@ abstract class Generator extends Model
if
(
$this
->
enableI18N
)
{
if
(
$this
->
enableI18N
)
{
// If there are placeholders, use them
// If there are placeholders, use them
if
(
!
empty
(
$placeholders
))
{
if
(
!
empty
(
$placeholders
))
{
$search
=
[
'array ('
,
')'
];
$ph
=
', '
.
VarDumper
::
export
(
$placeholders
);
$replace
=
[
'['
,
']'
];
$ph
=
', '
.
str_replace
(
$search
,
$replace
,
var_export
(
$placeholders
,
true
));
}
else
{
}
else
{
$ph
=
''
;
$ph
=
''
;
}
}
...
...
framework/base/ErrorHandler.php
View file @
1641e057
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
namespace
yii\base
;
namespace
yii\base
;
use
Yii
;
use
Yii
;
use
yii\helpers\VarDumper
;
use
yii\web\HttpException
;
use
yii\web\HttpException
;
/**
/**
...
@@ -107,7 +108,7 @@ abstract class ErrorHandler extends Component
...
@@ -107,7 +108,7 @@ abstract class ErrorHandler extends Component
echo
'<pre>'
.
htmlspecialchars
(
$msg
,
ENT_QUOTES
,
Yii
::
$app
->
charset
)
.
'</pre>'
;
echo
'<pre>'
.
htmlspecialchars
(
$msg
,
ENT_QUOTES
,
Yii
::
$app
->
charset
)
.
'</pre>'
;
}
}
}
}
$msg
.=
"
\n\$
_SERVER = "
.
var_export
(
$_SERVER
,
true
);
$msg
.=
"
\n\$
_SERVER = "
.
VarDumper
::
export
(
$_SERVER
);
error_log
(
$msg
);
error_log
(
$msg
);
exit
(
1
);
exit
(
1
);
}
}
...
...
framework/console/controllers/AssetController.php
View file @
1641e057
...
@@ -10,6 +10,7 @@ namespace yii\console\controllers;
...
@@ -10,6 +10,7 @@ namespace yii\console\controllers;
use
Yii
;
use
Yii
;
use
yii\console\Exception
;
use
yii\console\Exception
;
use
yii\console\Controller
;
use
yii\console\Controller
;
use
yii\helpers\VarDumper
;
/**
/**
* Allows you to combine and compress your JavaScript and CSS files.
* Allows you to combine and compress your JavaScript and CSS files.
...
@@ -392,7 +393,7 @@ class AssetController extends Controller
...
@@ -392,7 +393,7 @@ class AssetController extends Controller
}
}
}
}
}
}
$array
=
var_export
(
$array
,
true
);
$array
=
VarDumper
::
export
(
$array
);
$version
=
date
(
'Y-m-d H:i:s'
,
time
());
$version
=
date
(
'Y-m-d H:i:s'
,
time
());
$bundleFileContent
=
<<<EOD
$bundleFileContent
=
<<<EOD
<?php
<?php
...
@@ -573,8 +574,8 @@ EOD;
...
@@ -573,8 +574,8 @@ EOD;
*/
*/
public
function
actionTemplate
(
$configFile
)
public
function
actionTemplate
(
$configFile
)
{
{
$jsCompressor
=
var_export
(
$this
->
jsCompressor
,
true
);
$jsCompressor
=
VarDumper
::
export
(
$this
->
jsCompressor
);
$cssCompressor
=
var_export
(
$this
->
cssCompressor
,
true
);
$cssCompressor
=
VarDumper
::
export
(
$this
->
cssCompressor
);
$template
=
<<<EOD
$template
=
<<<EOD
<?php
<?php
...
...
framework/console/controllers/MessageController.php
View file @
1641e057
...
@@ -11,6 +11,7 @@ use Yii;
...
@@ -11,6 +11,7 @@ use Yii;
use
yii\console\Controller
;
use
yii\console\Controller
;
use
yii\console\Exception
;
use
yii\console\Exception
;
use
yii\helpers\FileHelper
;
use
yii\helpers\FileHelper
;
use
yii\helpers\VarDumper
;
/**
/**
* Extracts messages to be translated from source files.
* Extracts messages to be translated from source files.
...
@@ -374,7 +375,7 @@ class MessageController extends Controller
...
@@ -374,7 +375,7 @@ class MessageController extends Controller
if
(
$format
===
'po'
)
{
if
(
$format
===
'po'
)
{
$content
=
$merged
;
$content
=
$merged
;
}
else
{
}
else
{
$array
=
str_replace
(
"
\r
"
,
''
,
var_export
(
$merged
,
true
)
);
$array
=
VarDumper
::
export
(
$merged
);
$content
=
<<<EOD
$content
=
<<<EOD
<?php
<?php
/**
/**
...
...
framework/rbac/PhpManager.php
View file @
1641e057
...
@@ -10,6 +10,7 @@ namespace yii\rbac;
...
@@ -10,6 +10,7 @@ namespace yii\rbac;
use
yii\base\InvalidCallException
;
use
yii\base\InvalidCallException
;
use
yii\base\InvalidParamException
;
use
yii\base\InvalidParamException
;
use
Yii
;
use
Yii
;
use
yii\helpers\VarDumper
;
/**
/**
* PhpManager represents an authorization manager that stores authorization
* PhpManager represents an authorization manager that stores authorization
...
@@ -703,6 +704,6 @@ class PhpManager extends BaseManager
...
@@ -703,6 +704,6 @@ class PhpManager extends BaseManager
*/
*/
protected
function
saveToFile
(
$data
,
$file
)
protected
function
saveToFile
(
$data
,
$file
)
{
{
file_put_contents
(
$file
,
"<?php
\n
return "
.
var_export
(
$data
,
true
)
.
";
\n
"
,
LOCK_EX
);
file_put_contents
(
$file
,
"<?php
\n
return "
.
VarDumper
::
export
(
$data
)
.
";
\n
"
,
LOCK_EX
);
}
}
}
}
framework/web/ErrorHandler.php
View file @
1641e057
...
@@ -11,6 +11,7 @@ use Yii;
...
@@ -11,6 +11,7 @@ use Yii;
use
yii\base\Exception
;
use
yii\base\Exception
;
use
yii\base\ErrorException
;
use
yii\base\ErrorException
;
use
yii\base\UserException
;
use
yii\base\UserException
;
use
yii\helpers\VarDumper
;
/**
/**
* ErrorHandler handles uncaught PHP errors and exceptions.
* ErrorHandler handles uncaught PHP errors and exceptions.
...
@@ -262,7 +263,7 @@ class ErrorHandler extends \yii\base\ErrorHandler
...
@@ -262,7 +263,7 @@ class ErrorHandler extends \yii\base\ErrorHandler
$request
=
''
;
$request
=
''
;
foreach
([
'_GET'
,
'_POST'
,
'_SERVER'
,
'_FILES'
,
'_COOKIE'
,
'_SESSION'
,
'_ENV'
]
as
$name
)
{
foreach
([
'_GET'
,
'_POST'
,
'_SERVER'
,
'_FILES'
,
'_COOKIE'
,
'_SESSION'
,
'_ENV'
]
as
$name
)
{
if
(
!
empty
(
$GLOBALS
[
$name
]))
{
if
(
!
empty
(
$GLOBALS
[
$name
]))
{
$request
.=
'$'
.
$name
.
' = '
.
var_export
(
$GLOBALS
[
$name
],
true
)
.
";
\n\n
"
;
$request
.=
'$'
.
$name
.
' = '
.
VarDumper
::
export
(
$GLOBALS
[
$name
]
)
.
";
\n\n
"
;
}
}
}
}
...
...
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