array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'eventconfig.requirefeatures.php', 1 => 'EventConfig::requireFeatures', ), 'up' => array ( 0 => 'class.eventconfig.php', 1 => 'EventConfig', ), 'prev' => array ( 0 => 'eventconfig.construct.php', 1 => 'EventConfig::__construct', ), 'next' => array ( 0 => 'eventconfig.setflags.php', 1 => 'EventConfig::setFlags', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/event/eventconfig/requirefeatures.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL event >= 1.2.6-beta)
EventConfig::requireFeatures — Enters a required event method feature that the application demands
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 required\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 required FDS - arbitrary file descriptor types, and not just sockets