Event EventBase::getMethod

(PECL event >= 1.2.6-beta)

EventBase::getMethod — 사용 중인 이벤트 메서드를 반환합니다.


설명

public EventBase::getMethod(): string


매개변수

이 함수에는 매개변수가 없습니다.


반환 값

사용된 이벤트 메서드(백엔드)를 나타내는 문자열입니다.


Examples

예제 #1 EventBase::getMethod() 예제

                  
<?php
$cfg = new EventConfig();
if ($cfg->avoidMethod("select")) {
    echo "'select' method avoided\n";
}

// Create event_base associated with the config
$base = new EventBase($cfg);
echo "Event method used: ", $base->getMethod(), PHP_EOL;

?>
                  
                

위의 예는 다음과 유사한 결과를 출력합니다.

`select' method avoided
Event method used: epoll
                

기타