Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 22864 программиста и 1214 роботов. Сейчас ищут 743 программиста ...
Приступая к работе

EventConfig::requireFeatures - Enters a required event method feature that the application demands

Вернуться к: EventConfig

EventConfig::requireFeatures

(PECL event >= 1.2.6-beta)

EventConfig::requireFeaturesEnters a required event method feature that the application demands

Описание

public bool EventConfig::requireFeatures ( int $feature )

Enters a required event method feature that the application demands

Список параметров

feature

Bitmask of required features. See EventConfig::FEATURE_* constants

Возвращаемые значения

Примеры

Пример #1 EventConfig::requireFeatures() example

<?php
$cfg 
= new EventConfig();

// Create event_base associated with the config
$base = new EventBase($cfg);

// Require FDS feature
if ($cfg->requireFeatures(EventConfig::FEATURE_FDS)) {
    echo 
"FDS feature is now requried\n";

    
$base = new EventBase($cfg);
    (
$base->getFeatures() & EventConfig::FEATURE_FDS)
        and print(
"FDS - arbitrary file descriptor types, and not just sockets\n");
}
?>

Результатом выполнения данного примера будет что-то подобное:

FDS feature is now requried
FDS - arbitrary file descriptor types, and not just sockets

Смотрите также



Вернуться к: EventConfig

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware