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 #define HC(Opt, ...) \
53 inline bool RequestInjectionData::getSuppressHAC##Opt##Notices() const { \
54 return m_suppressHAC##Opt; \
56 inline void RequestInjectionData::setSuppressHAC##Opt##Notices(bool flag) { \
57 m_suppressHAC##Opt = flag; \
62 inline bool RequestInjectionData::getCoverage() const {
66 inline void RequestInjectionData::setCoverage(bool flag
) {
71 inline bool RequestInjectionData::getDebuggerAttached() {
72 return m_debuggerAttached
;
75 inline void RequestInjectionData::setDebuggerAttached(bool flag
) {
76 m_debuggerAttached
= flag
;
80 inline size_t RequestInjectionData::getDebuggerStackDepth() const {
81 return m_activeLineBreaks
.size();
84 inline bool RequestInjectionData::getDebuggerForceIntr() const {
87 // Force interrupts when over an active line.
88 getActiveLineBreak() != -1 ||
89 // Interrupts forced while stepping in.
91 // Step out forces interrupts after we have exited the function.
92 m_debuggerStepOut
== StepOutState::Out
;
95 inline bool RequestInjectionData::getDebuggerIntr() const {
96 return m_debuggerIntr
;
99 inline void RequestInjectionData::setDebuggerIntr(bool flag
) {
100 m_debuggerIntr
= flag
;
104 inline bool RequestInjectionData::getDebuggerStepIn() const {
105 return m_debuggerStepIn
;
108 inline void RequestInjectionData::setDebuggerStepIn(bool flag
) {
109 m_debuggerStepIn
= flag
;
113 inline RequestInjectionData::StepOutState
114 RequestInjectionData::getDebuggerStepOut() const {
115 return m_debuggerStepOut
;
118 inline void RequestInjectionData::setDebuggerStepOut(StepOutState state
) {
119 m_debuggerStepOut
= state
;
123 inline bool RequestInjectionData::getDebuggerNext() const {
124 return m_debuggerNext
;
127 inline void RequestInjectionData::setDebuggerNext(bool flag
) {
128 m_debuggerNext
= flag
;
132 inline int RequestInjectionData::getDebuggerFlowDepth() const {
133 return m_debuggerFlowDepth
;
136 inline void RequestInjectionData::setDebuggerFlowDepth(int depth
) {
137 m_debuggerFlowDepth
= depth
;
140 inline int RequestInjectionData::getActiveLineBreak() const {
141 return m_activeLineBreaks
.empty() ? -1 : m_activeLineBreaks
.top();
144 inline void RequestInjectionData::clearActiveLineBreak() {
145 if (m_activeLineBreaks
.empty()) return;
146 m_activeLineBreaks
.top() = -1;
150 inline void RequestInjectionData::setActiveLineBreak(int line
) {
152 if (m_activeLineBreaks
.empty()) return;
153 m_activeLineBreaks
.top() = line
;
157 inline void RequestInjectionData::popActiveLineBreak() {
158 if (m_activeLineBreaks
.empty()) return;
159 m_activeLineBreaks
.pop();
163 inline void RequestInjectionData::pushActiveLineBreak() {
164 m_activeLineBreaks
.push(-1);
168 inline const std::vector
<std::string
>&
169 RequestInjectionData::getIncludePaths() const {
170 return m_include_paths
;
173 inline const std::string
& RequestInjectionData::getDefaultMimeType() const {
174 return m_defaultMimeType
;
177 inline int64_t RequestInjectionData::getErrorReportingLevel() {
178 return m_errorReportingLevel
;
181 inline void RequestInjectionData::setErrorReportingLevel(int64_t level
) {
182 m_errorReportingLevel
= level
;
185 inline int64_t RequestInjectionData::getMemoryLimitNumeric() const {
186 return m_maxMemoryNumeric
;
189 inline const std::string
& RequestInjectionData::getVariablesOrder() const {
190 return m_variablesOrder
;
193 inline void RequestInjectionData::setVariablesOrder(const std::string
& order
) {
194 m_variablesOrder
= order
;
197 inline const std::string
& RequestInjectionData::getRequestOrder() const {
198 return m_requestOrder
;
201 inline void RequestInjectionData::setRequestOrder(const std::string
& order
) {
202 m_requestOrder
= order
;
205 inline int64_t RequestInjectionData::getSocketDefaultTimeout() const {
206 return m_socketDefaultTimeout
;
209 inline const std::string
& RequestInjectionData::getUserAgent() const {
213 inline void RequestInjectionData::setUserAgent(const std::string
& agent
) {
217 inline const std::string
& RequestInjectionData::getTimeZone() const {
221 inline void RequestInjectionData::setTimeZone(const std::string
& tz
) {
225 inline void RequestInjectionData::setSafeFileAccess(bool b
) {
226 m_safeFileAccess
= b
;
229 inline bool RequestInjectionData::hasSafeFileAccess() const {
230 return m_safeFileAccess
;
233 inline bool RequestInjectionData::hasHtmlErrors() const {
237 inline bool RequestInjectionData::logFunctionCalls() const {
238 return m_logFunctionCalls
;
240 ////////////////////////////////////////////////////////////////////////////////