downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

EventConfig::setMaxDispatchInterval> <EventConfig::__construct
[edit] Last updated: Fri, 17 May 2013

view this page in

EventConfig::requireFeatures

(PECL event >= 1.2.6-beta)

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

Description

public bool EventConfig::requireFeatures ( int $feature )

Enters a required event method feature that the application demands

Parameters

feature

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

Return Values

Examples

Example #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");
}
?>

The above example will output something similar to:

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

See Also



add a note add a note User Contributed Notes EventConfig::requireFeatures - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites