Io\Poll\Context::getBackend

Returns the backend used by the context

説明

public Io\Poll\Backend Io\Poll\Context::getBackend()

Returns the backend that the context polls with. This is never Io\Poll\Backend::Auto: a context created with it reports the backend that was selected.

パラメータ

この関数にはパラメータはありません。

戻り値

Returns the Io\Poll\Backend case of the backend in use.

例

例1 Io\Poll\Context::getBackend example

<?php
use Io\Poll\Backend;
use Io\Poll\Context;

$context = new Context();
var_dump($context->getBackend());

$context = new Context(Backend::Poll);
var_dump($context->getBackend());

上の例の出力は、 たとえば以下のようになります。

enum(Io\Poll\Backend::Epoll)
enum(Io\Poll\Backend::Poll)

参考

  • Io\Poll\Context::__construct
  • Io\Poll\Backend::supportsEdgeTriggering