phpday 2027 - Call for Papers

Io\Poll\Context::getBackend

(PHP 8 >= 8.6.0)

Io\Poll\Context::getBackend — Returns the backend used by the context

Açıklama

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

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.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

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

Örnekler

Örnek 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());

Yukarıdaki örnek şuna benzer bir çıktı üretir:

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

Ayrıca Bakınız

+add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top