Page Menu
Home
WMGMC Issues
搜索
Configure Global Search
登录
Files
F16146
ProfilerExtension.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
订阅
标记用于日后
授予令牌
Size
1 KB
Referenced Files
None
订阅者
None
ProfilerExtension.php
View Options
<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Twig\Extension
;
use
Twig\Profiler\NodeVisitor\ProfilerNodeVisitor
;
use
Twig\Profiler\Profile
;
class
ProfilerExtension
extends
AbstractExtension
{
private
$actives
=
[];
public
function
__construct
(
Profile
$profile
)
{
$this
->
actives
[]
=
$profile
;
}
/**
* @return void
*/
public
function
enter
(
Profile
$profile
)
{
$this
->
actives
[
0
]->
addProfile
(
$profile
);
array_unshift
(
$this
->
actives
,
$profile
);
}
/**
* @return void
*/
public
function
leave
(
Profile
$profile
)
{
$profile
->
leave
();
array_shift
(
$this
->
actives
);
if
(
1
===
\count
(
$this
->
actives
))
{
$this
->
actives
[
0
]->
leave
();
}
}
public
function
getNodeVisitors
():
array
{
return
[
new
ProfilerNodeVisitor
(
static
::
class
)];
}
}
File Metadata
详情
附加的
Mime Type
text/x-php
Expires
9月 11 Thu, 1:57 PM (16 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5616
默认替代文本
ProfilerExtension.php (1 KB)
Attached To
Mode
rMAILCOW mailcow-tracking
附加的
Detach File
Event Timeline
Log In to Comment