mirror of
https://github.com/php/doc-ru.git
synced 2025-07-20 16:42:29 +00:00
111 lines
3.1 KiB
XML
111 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- EN-Revision: ac397fd0da4d814b5a2f4ba49254f9b6093315e1 Maintainer: rjhdby Status: ready -->
|
||
<!-- Reviewed: no -->
|
||
|
||
<refentry xml:id="eventconfig.requirefeatures" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||
<refnamediv>
|
||
<refname>EventConfig::requireFeatures</refname>
|
||
<refpurpose>Ввести требуемые приложением свойства метода события</refpurpose>
|
||
</refnamediv>
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis>
|
||
<modifier>public</modifier>
|
||
<type>bool</type>
|
||
<methodname>EventConfig::requireFeatures</methodname>
|
||
<methodparam>
|
||
<type>int</type>
|
||
<parameter>feature</parameter>
|
||
</methodparam>
|
||
</methodsynopsis>
|
||
<para>
|
||
Вводит требуемую приложением функциональность метода события
|
||
</para>
|
||
</refsect1>
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term>
|
||
<parameter>feature</parameter>
|
||
</term>
|
||
<listitem>
|
||
<para>
|
||
Битовая маска требуемых свойств. Смотрите
|
||
<link
|
||
linkend="eventconfig.constants">
|
||
константы <literal>EventConfig::FEATURE_*</literal></link>
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</refsect1>
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
&return.success;
|
||
</para>
|
||
</refsect1>
|
||
<refsect1 role="examples">
|
||
&reftitle.examples;
|
||
<example>
|
||
<title>
|
||
Пример использования <function>EventConfig::requireFeatures</function></title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
$cfg = new EventConfig();
|
||
|
||
// Создаём event_base, связанный с конфигом $cfg
|
||
$base = new EventBase($cfg);
|
||
|
||
// Запрашиваем свойство FDS
|
||
if ($cfg->requireFeatures(EventConfig::FEATURE_FDS)) {
|
||
echo "Свойство FDS запрошено\n";
|
||
|
||
$base = new EventBase($cfg);
|
||
($base->getFeatures() & EventConfig::FEATURE_FDS)
|
||
and print "FDS — произвольные типы дескрипторов файлов, а не только сокеты\n";
|
||
}
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
&example.outputs.similar;
|
||
<screen>
|
||
<![CDATA[
|
||
Свойство FDS запрошено
|
||
FDS - произвольные типы дескрипторов файлов, а не только сокеты
|
||
]]>
|
||
</screen>
|
||
</example>
|
||
</refsect1>
|
||
<refsect1 role="seealso">
|
||
&reftitle.seealso;
|
||
<simplelist>
|
||
<member>
|
||
<methodname>EventBase::getFeatures</methodname>
|
||
</member>
|
||
</simplelist>
|
||
</refsect1>
|
||
</refentry>
|
||
<!-- Keep this comment at the end of the file
|
||
Local variables:
|
||
mode: sgml
|
||
sgml-omittag:t
|
||
sgml-shorttag:t
|
||
sgml-minimize-attributes:nil
|
||
sgml-always-quote-attributes:t
|
||
sgml-indent-step:1
|
||
sgml-indent-data:t
|
||
indent-tabs-mode:nil
|
||
sgml-parent-document:nil
|
||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||
sgml-exposed-tags:nil
|
||
sgml-local-catalogs:nil
|
||
sgml-local-ecat-files:nil
|
||
End:
|
||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||
vim: et tw=78 syn=sgml
|
||
vi: ts=1 sw=1
|
||
-->
|