Seaslog SeasLog::getRequestVariable
(PECL seaslog >=1.9.0)
SeasLog::getRequestVariable — SeasLog 요청 변수 가져오기
설명
public static SeasLog::getRequestVariable(int $key
): bool
SeasLog 요청 변수를 가져옵니다.
매개변수
key
- Constant int.
반환 값
설정 성공 시 요청 변수 값을 반환합니다.
Examples
예제 #1 SeasLog::getRequestVariable() 예제
<?php
$sDomainPort = 'domain:port';
$sRequestUri = 'uri';
$sRequestMethod = 'method';
$sClientIp = 'client_ip';
$iErrorKey = 1000;
$oSeasLog = new SeasLog();
var_dump($oSeasLog->setRequestVariable(SEASLOG_REQUEST_VARIABLE_DOMAIN_PORT, $sDomainPort));
var_dump($oSeasLog->setRequestVariable(SEASLOG_REQUEST_VARIABLE_REQUEST_URI, $sRequestUri));
var_dump($oSeasLog->setRequestVariable(SEASLOG_REQUEST_VARIABLE_REQUEST_METHOD, $sRequestMethod));
var_dump($oSeasLog->setRequestVariable(SEASLOG_REQUEST_VARIABLE_CLIENT_IP, $sClientIp));
var_dump($oSeasLog->setRequestVariable($iErrorKey,NULL));
var_dump($oSeasLog->getRequestVariable(SEASLOG_REQUEST_VARIABLE_DOMAIN_PORT) == $sDomainPort);
var_dump($oSeasLog->getRequestVariable(SEASLOG_REQUEST_VARIABLE_REQUEST_URI) == $sRequestUri);
var_dump($oSeasLog->getRequestVariable(SEASLOG_REQUEST_VARIABLE_REQUEST_METHOD) == $sRequestMethod);
var_dump($oSeasLog->getRequestVariable(SEASLOG_REQUEST_VARIABLE_CLIENT_IP) == $sClientIp);
var_dump($oSeasLog->getRequestVariable($iErrorKey));
?>
위의 예는 다음과 유사한 결과를 출력합니다.
bool(true) bool(true) bool(true) bool(true) bool(false) bool(true) bool(true) bool(true) bool(true) bool(false)
기타
- SeasLog::setRequestVariable() - SeasLog 요청 변수 수동 설정