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
9193e477
Commit
9193e477
authored
Aug 10, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed yii\debug\Module::enabled.
parent
1f63bf00
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
web.php
apps/basic/config/web.php
+9
-8
Module.php
framework/yii/debug/Module.php
+8
-5
No files found.
apps/basic/config/web.php
View file @
9193e477
<?php
<?php
return
array
(
$config
=
array
(
'id'
=>
'bootstrap'
,
'id'
=>
'bootstrap'
,
'basePath'
=>
dirname
(
__DIR__
),
'basePath'
=>
dirname
(
__DIR__
),
'preload'
=>
array
(
'debug'
),
'modules'
=>
array
(
'debug'
=>
array
(
'class'
=>
'yii\debug\Module'
,
'enabled'
=>
YII_ENV_DEV
,
),
),
'components'
=>
array
(
'components'
=>
array
(
'cache'
=>
array
(
'cache'
=>
array
(
'class'
=>
'yii\caching\FileCache'
,
'class'
=>
'yii\caching\FileCache'
,
...
@@ -32,3 +25,11 @@ return array(
...
@@ -32,3 +25,11 @@ return array(
),
),
'params'
=>
require
(
__DIR__
.
'/params.php'
),
'params'
=>
require
(
__DIR__
.
'/params.php'
),
);
);
if
(
YII_ENV_DEV
)
{
$config
[
'preload'
][]
=
'debug'
;
$config
[
'modules'
][
'debug'
]
=
'yii\debug\Module'
;
$config
[
'modules'
][
'gii'
]
=
'yii\gii\Module'
;
}
return
$config
;
framework/yii/debug/Module.php
View file @
9193e477
...
@@ -25,7 +25,9 @@ class Module extends \yii\base\Module
...
@@ -25,7 +25,9 @@ class Module extends \yii\base\Module
* by localhost.
* by localhost.
*/
*/
public
$allowedIPs
=
array
(
'127.0.0.1'
,
'::1'
);
public
$allowedIPs
=
array
(
'127.0.0.1'
,
'::1'
);
/**
* @var string the namespace that controller classes are in.
*/
public
$controllerNamespace
=
'yii\debug\controllers'
;
public
$controllerNamespace
=
'yii\debug\controllers'
;
/**
/**
* @var LogTarget
* @var LogTarget
...
@@ -39,15 +41,16 @@ class Module extends \yii\base\Module
...
@@ -39,15 +41,16 @@ class Module extends \yii\base\Module
* @var string the directory storing the debugger data files. This can be specified using a path alias.
* @var string the directory storing the debugger data files. This can be specified using a path alias.
*/
*/
public
$dataPath
=
'@runtime/debug'
;
public
$dataPath
=
'@runtime/debug'
;
/**
* @var integer the maximum number of debug data files to keep. If there are more files generated,
* the oldest ones will be removed.
*/
public
$historySize
=
50
;
public
$historySize
=
50
;
public
$enabled
=
true
;
public
function
init
()
public
function
init
()
{
{
parent
::
init
();
parent
::
init
();
if
(
!
$this
->
enabled
)
{
return
;
}
$this
->
dataPath
=
Yii
::
getAlias
(
$this
->
dataPath
);
$this
->
dataPath
=
Yii
::
getAlias
(
$this
->
dataPath
);
$this
->
logTarget
=
Yii
::
$app
->
getLog
()
->
targets
[
'debug'
]
=
new
LogTarget
(
$this
);
$this
->
logTarget
=
Yii
::
$app
->
getLog
()
->
targets
[
'debug'
]
=
new
LogTarget
(
$this
);
Yii
::
$app
->
getView
()
->
on
(
View
::
EVENT_END_BODY
,
array
(
$this
,
'renderToolbar'
));
Yii
::
$app
->
getView
()
->
on
(
View
::
EVENT_END_BODY
,
array
(
$this
,
'renderToolbar'
));
...
...
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