FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
debugbar/src/DebugBar/Debug.php at master · phalcon/debugbar · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
phalcon
/
debugbar
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
2
Star
5
Code
Issues
6
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
debugbar
/
src
/
DebugBar
/
Debug.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
144 lines (127 loc) · 2.78 KB
Breadcrumbs
debugbar
/
src
/
DebugBar
/
Debug.php
Copy path
File metadata and controls
144 lines (127 loc) · 2.78 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php
/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <team@phalcon.io>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
declare
(strict_types=
1
);
namespace
Phalcon
\
DebugBar
;
use
Throwable
;
/**
* Static entry point for manual instrumentation (`Debug::info()`,
* `Debug::startMeasure()`, …). It holds a reference to the active bar, set by
* the registration `Provider`; every call is `self::$bar?->…`, so it no-ops
* when the bar was never registered (any blocked environment).
*/
final
class
Debug
{
/**
* @var DebugBar|null
*/
private
static
?
DebugBar
$
bar
=
null
;
private
function
__construct
()
{
}
/**
* @param Throwable $throwable
*
* @return void
*/
public
static
function
addException
(
Throwable
$
throwable
):
void
{
self
::
$
bar
?->addException(
$
throwable
);
}
/**
* @param mixed ...$args
*
* @return void
*/
public
static
function
debug
(
mixed
...
$
args
):
void
{
self
::
$
bar
?->debug(...
$
args
);
}
/**
* @param mixed ...$args
*
* @return void
*/
public
static
function
error
(
mixed
...
$
args
):
void
{
self
::
$
bar
?->error(...
$
args
);
}
/**
* @return DebugBar|null
*/
public
static
function
getBar
(): ?
DebugBar
{
return
self
::
$
bar
;
}
/**
* @param mixed ...$args
*
* @return void
*/
public
static
function
info
(
mixed
...
$
args
):
void
{
self
::
$
bar
?->info(...
$
args
);
}
/**
* @param mixed $message
* @param string $label
*
* @return void
*/
public
static
function
message
(
mixed
$
message
,
string
$
label
=
'
info
'
):
void
{
self
::
$
bar
?->message(
$
message
,
$
label
);
}
/**
* @param mixed ...$args
*
* @return void
*/
public
static
function
notice
(
mixed
...
$
args
):
void
{
self
::
$
bar
?->notice(...
$
args
);
}
/**
* @param DebugBar|null $bar
*
* @return void
*/
public
static
function
setBar
(?
DebugBar
$
bar
):
void
{
self
::
$
bar
=
$
bar
;
}
/**
* @param string $name
* @param string|null $label
*
* @return void
*/
public
static
function
startMeasure
(
string
$
name
, ?
string
$
label
=
null
):
void
{
self
::
$
bar
?->startMeasure(
$
name
,
$
label
);
}
/**
* @param string $name
*
* @return void
*/
public
static
function
stopMeasure
(
string
$
name
):
void
{
self
::
$
bar
?->stopMeasure(
$
name
);
}
/**
* @param mixed ...$args
*
* @return void
*/
public
static
function
warning
(
mixed
...
$
args
):
void
{
self
::
$
bar
?->warning(...
$
args
);
}
}
Back
|
FazBrowse Home
|
New Git URL