2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #ifndef incl_HPHP_REQUEST_INJECTION_DATA_INL_H_
18 #error "Can only be included by request-injection-data.h"
22 ////////////////////////////////////////////////////////////////////////////////
24 inline int RequestInjectionData::getTimeout() const {
25 return m_timer
.m_timeoutSeconds
;
28 inline int RequestInjectionData::getCPUTimeout() const {
29 return m_cpuTimer
.m_timeoutSeconds
;
32 inline bool RequestInjectionData::getJit() const {
36 inline bool RequestInjectionData::isJittingDisabled() const {
37 return m_jittingDisabled
;
40 inline void RequestInjectionData::setJittingDisabled(bool flag
) {
41 m_jittingDisabled
= flag
;
44 inline bool RequestInjectionData::getJitFolding() const {
48 inline void RequestInjectionData::setJitFolding(bool flag
) {
52 inline bool RequestInjectionData::getSuppressHackArrayCompatNotices() const {
53 return m_suppressHackArrayCompatNotices
;
56 inline void RequestInjectionData::setSuppressHackArrayCompatNotices(bool flag
) {
57 m_suppressHackArrayCompatNotices
= flag
;
60 inline bool RequestInjectionData::getCoverage() const {
64 inline void RequestInjectionData::setCoverage(bool flag
) {
69 inline bool RequestInjectionData::getDebuggerAttached() {
70 return m_debuggerAttached
;
73 inline void RequestInjectionData::setDebuggerAttached(bool flag
) {
74 m_debuggerAttached
= flag
;
78 inline size_t RequestInjectionData::getDebuggerStackDepth() const {
79 return m_activeLineBreaks
.size();
82 inline bool RequestInjectionData::getDebuggerForceIntr() const {
85 // Force interrupts when over an active line.
86 getActiveLineBreak() != -1 ||
87 // Interrupts forced while stepping in.
89 // Step out forces interrupts after we have exited the function.
90 m_debuggerStepOut
== StepOutState::Out
;
93 inline bool RequestInjectionData::getDebuggerIntr() const {
94 return m_debuggerIntr
;
97 inline void RequestInjectionData::setDebuggerIntr(bool flag
) {
98 m_debuggerIntr
= flag
;
102 inline bool RequestInjectionData::getDebuggerStepIn() const {
103 return m_debuggerStepIn
;
106 inline void RequestInjectionData::setDebuggerStepIn(bool flag
) {
107 m_debuggerStepIn
= flag
;
111 inline RequestInjectionData::StepOutState
112 RequestInjectionData::getDebuggerStepOut() const {
113 return m_debuggerStepOut
;
116 inline void RequestInjectionData::setDebuggerStepOut(StepOutState state
) {
117 m_debuggerStepOut
= state
;
121 inline bool RequestInjectionData::getDebuggerNext() const {
122 return m_debuggerNext
;
125 inline void RequestInjectionData::setDebuggerNext(bool flag
) {
126 m_debuggerNext
= flag
;
130 inline int RequestInjectionData::getDebuggerFlowDepth() const {
131 return m_debuggerFlowDepth
;
134 inline void RequestInjectionData::setDebuggerFlowDepth(int depth
) {
135 m_debuggerFlowDepth
= depth
;
138 inline int RequestInjectionData::getActiveLineBreak() const {
139 return m_activeLineBreaks
.empty() ? -1 : m_activeLineBreaks
.top();
142 inline void RequestInjectionData::clearActiveLineBreak() {
143 if (m_activeLineBreaks
.empty()) return;
144 m_activeLineBreaks
.top() = -1;
148 inline void RequestInjectionData::setActiveLineBreak(int line
) {
150 if (m_activeLineBreaks
.empty()) return;
151 m_activeLineBreaks
.top() = line
;
155 inline void RequestInjectionData::popActiveLineBreak() {
156 if (m_activeLineBreaks
.empty()) return;
157 m_activeLineBreaks
.pop();
161 inline void RequestInjectionData::pushActiveLineBreak() {
162 m_activeLineBreaks
.push(-1);
166 inline const std::vector
<std::string
>&
167 RequestInjectionData::getIncludePaths() const {
168 return m_include_paths
;
171 inline const std::string
& RequestInjectionData::getDefaultMimeType() const {
172 return m_defaultMimeType
;
175 inline int64_t RequestInjectionData::getErrorReportingLevel() {
176 return m_errorReportingLevel
;
179 inline void RequestInjectionData::setErrorReportingLevel(int64_t level
) {
180 m_errorReportingLevel
= level
;
183 inline int64_t RequestInjectionData::getMemoryLimitNumeric() const {
184 return m_maxMemoryNumeric
;
187 inline const std::string
& RequestInjectionData::getVariablesOrder() const {
188 return m_variablesOrder
;
191 inline void RequestInjectionData::setVariablesOrder(const std::string
& order
) {
192 m_variablesOrder
= order
;
195 inline const std::string
& RequestInjectionData::getRequestOrder() const {
196 return m_requestOrder
;
199 inline void RequestInjectionData::setRequestOrder(const std::string
& order
) {
200 m_requestOrder
= order
;
203 inline int64_t RequestInjectionData::getSocketDefaultTimeout() const {
204 return m_socketDefaultTimeout
;
207 inline const std::string
& RequestInjectionData::getUserAgent() const {
211 inline void RequestInjectionData::setUserAgent(const std::string
& agent
) {
215 inline const std::string
& RequestInjectionData::getTimeZone() const {
219 inline void RequestInjectionData::setTimeZone(const std::string
& tz
) {
223 inline void RequestInjectionData::setSafeFileAccess(bool b
) {
224 m_safeFileAccess
= b
;
227 inline bool RequestInjectionData::hasSafeFileAccess() const {
228 return m_safeFileAccess
;
231 inline bool RequestInjectionData::hasTrackErrors() const {
232 return m_trackErrors
;
235 inline bool RequestInjectionData::hasHtmlErrors() const {
239 inline bool RequestInjectionData::logFunctionCalls() const {
240 return m_logFunctionCalls
;
242 ////////////////////////////////////////////////////////////////////////////////