FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sentry-php/src/Frame.php at source-frame-cache · getsentry/sentry-php · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
getsentry
/
sentry-php
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
475
Star
1.9k
Code
Issues
20
Pull requests
11
Discussions
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
sentry-php
/
src
/
Frame.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
263 lines (227 loc) · 6.84 KB
Breadcrumbs
sentry-php
/
src
/
Frame.php
Copy path
File metadata and controls
263 lines (227 loc) · 6.84 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<?php
declare
(strict_types=
1
);
namespace
Sentry
;
/**
* This class represents a single frame of a stacktrace.
*
* @author Stefano Arlandini <sarlandini@alice.it>
*/
final
class
Frame
{
public
const
INTERNAL_FRAME_FILENAME
=
'
[internal]
'
;
/**
* @deprecated This constant is deprecated and will be removed in 5.x.
*/
public
const
ANONYMOUS_CLASS_PREFIX
=
"
class@anonymous
\x00"
;
/**
* @var string|null The name of the function being called
*/
private
$
functionName
;
/**
* @var string|null The original function name, if the function name is
* shortened or demangled
*/
private
$
rawFunctionName
;
/**
* @var string The file where the frame originated
*/
private
$
file
;
/**
* @var string|null The absolute path to the source file
*/
private
$
absoluteFilePath
;
/**
* @var int The line at which the frame originated
*/
private
$
line
;
/**
* @var string[] A list of source code lines before the one where the frame
* originated
*/
private
$
preContext
= [];
/**
* @var string|null The source code written at the line number of the file that
* originated this frame
*/
private
$
contextLine
;
/**
* @var string[] A list of source code lines after the one where the frame
* originated
*/
private
$
postContext
= [];
/**
* @var bool Flag telling whether the frame is related to the execution of
* the relevant code in this stacktrace
*/
private
$
inApp
;
/**
* @var array<string, mixed> A mapping of variables which were available within
* this frame (usually context-locals)
*/
private
$
vars
= [];
/**
* Initializes a new instance of this class using the provided information.
*
* @param string|null $functionName The name of the function being called
* @param string $file The file where the frame originated
* @param string|null $rawFunctionName The original function name, if the function
* name is shortened or demangled
* @param string|null $absoluteFilePath The absolute path to the source file
* @param int $line The line at which the frame originated
* @param array<string, mixed> $vars A mapping of variables which were available
* within the frame
* @param bool $inApp Whether the frame is related to the
* execution of code relevant to the
* application
*/
public
function
__construct
(?
string
$
functionName
,
string
$
file
,
int
$
line
, ?
string
$
rawFunctionName
=
null
, ?
string
$
absoluteFilePath
=
null
,
array
$
vars
= [],
bool
$
inApp
=
true
)
{
$
this
->
functionName
=
$
functionName
;
$
this
->
file
=
$
file
;
$
this
->
line
=
$
line
;
$
this
->
rawFunctionName
=
$
rawFunctionName
;
$
this
->
absoluteFilePath
=
$
absoluteFilePath
;
$
this
->
vars
=
$
vars
;
$
this
->
inApp
=
$
inApp
;
}
/**
* Gets the name of the function being called.
*/
public
function
getFunctionName
(): ?
string
{
return
$
this
->
functionName
;
}
/**
* Gets the original function name, if the function name is shortened or
* demangled.
*/
public
function
getRawFunctionName
(): ?
string
{
return
$
this
->
rawFunctionName
;
}
/**
* Gets the file where the frame originated.
*/
public
function
getFile
():
string
{
return
$
this
->
file
;
}
/**
* Gets the absolute path to the source file.
*/
public
function
getAbsoluteFilePath
(): ?
string
{
return
$
this
->
absoluteFilePath
;
}
/**
* Gets the line at which the frame originated.
*/
public
function
getLine
():
int
{
return
$
this
->
line
;
}
/**
* Gets a list of source code lines before the one where the frame originated.
*
* @return string[]
*/
public
function
getPreContext
():
array
{
return
$
this
->
preContext
;
}
/**
* Sets a list of source code lines before the one where the frame originated.
*
* @param string[] $preContext The source code lines
*/
public
function
setPreContext
(
array
$
preContext
):
self
{
$
this
->
preContext
=
$
preContext
;
return
$
this
;
}
/**
* Gets the source code written at the line number of the file that originated
* this frame.
*/
public
function
getContextLine
(): ?
string
{
return
$
this
->
contextLine
;
}
/**
* Sets the source code written at the line number of the file that originated
* this frame.
*
* @param string|null $contextLine The source code line
*/
public
function
setContextLine
(?
string
$
contextLine
):
self
{
$
this
->
contextLine
=
$
contextLine
;
return
$
this
;
}
/**
* Gets a list of source code lines after the one where the frame originated.
*
* @return string[]
*/
public
function
getPostContext
():
array
{
return
$
this
->
postContext
;
}
/**
* Sets a list of source code lines after the one where the frame originated.
*
* @param string[] $postContext The source code lines
*/
public
function
setPostContext
(
array
$
postContext
):
self
{
$
this
->
postContext
=
$
postContext
;
return
$
this
;
}
/**
* Gets whether the frame is related to the execution of the relevant code
* in this stacktrace.
*/
public
function
isInApp
():
bool
{
return
$
this
->
inApp
;
}
/**
* Sets whether the frame is related to the execution of the relevant code
* in this stacktrace.
*
* @param bool $inApp flag indicating whether the frame is application-related
*/
public
function
setIsInApp
(
bool
$
inApp
):
self
{
$
this
->
inApp
=
$
inApp
;
return
$
this
;
}
/**
* Gets a mapping of variables which were available within this frame
* (usually context-locals).
*
* @return array<string, mixed>
*/
public
function
getVars
():
array
{
return
$
this
->
vars
;
}
/**
* Sets a mapping of variables which were available within this frame
* (usually context-locals).
*
* @param array<string, mixed> $vars The variables
*/
public
function
setVars
(
array
$
vars
):
self
{
$
this
->
vars
=
$
vars
;
return
$
this
;
}
/**
* Gets whether the frame is internal.
*/
public
function
isInternal
():
bool
{
return
$
this
->
file
===
self
::
INTERNAL_FRAME_FILENAME
;
}
}
Back
|
FazBrowse Home
|
New Git URL