mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00

* accomodate -> accommodate * agressive -> aggressive * begining -> beginning * enviroment -> environment * existance -> existence * fourty -> forty * foward -> forward * futher -> further * immediatly -> immediately * occured -> occurred * occuring -> occurring * occurance, occurence -> occurrence * prefered -> preferred * publically -> publicly * seperate -> separate * compliment -> complement
239 lines
7.2 KiB
XML
239 lines
7.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<phpdoc:classref xml:id="class.event" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
<title>The Event class</title>
|
|
<titleabbrev>Event</titleabbrev>
|
|
<partintro>
|
|
<!-- {{{ Event intro -->
|
|
<section xml:id="event.intro">
|
|
&reftitle.intro;
|
|
<para>
|
|
<classname>Event</classname>
|
|
class represents and event firing on a file descriptor being ready to read
|
|
from or write to; a file descriptor becoming ready to read from or write
|
|
to(edge-triggered I/O only); a timeout expiring; a signal occurring; a
|
|
user-triggered event.
|
|
</para>
|
|
<para>
|
|
Every event is associated with
|
|
<classname>EventBase</classname>
|
|
. However, event will never fire until it is
|
|
<emphasis>added</emphasis>
|
|
(via
|
|
<methodname>Event::add</methodname>
|
|
). An added event remains in
|
|
<emphasis>pending</emphasis>
|
|
state until the registered event occurs, thus turning it to
|
|
<emphasis>active</emphasis>
|
|
state. To handle events user may register a callback which is called when
|
|
event becomes active. If event is configured
|
|
<emphasis>persistent</emphasis>
|
|
, it remains pending. If it is not persistent, it stops being pending when
|
|
it's callback runs.
|
|
<methodname>Event::del</methodname>
|
|
method
|
|
<emphasis>deletes</emphasis>
|
|
event, thus making it non-pending. By means of
|
|
<methodname>Event::add</methodname>
|
|
method it could be added again.
|
|
</para>
|
|
</section>
|
|
<!-- }}} -->
|
|
<section xml:id="event.synopsis">
|
|
&reftitle.classsynopsis;
|
|
|
|
<!-- {{{ Synopsis -->
|
|
<classsynopsis>
|
|
<ooclass>
|
|
<classname>Event</classname>
|
|
</ooclass>
|
|
<!-- {{{ Class synopsis -->
|
|
<classsynopsisinfo>
|
|
<ooclass>
|
|
<modifier>final</modifier>
|
|
<classname>Event</classname>
|
|
</ooclass>
|
|
</classsynopsisinfo>
|
|
<!-- }}} -->
|
|
<classsynopsisinfo role="comment">Constants</classsynopsisinfo>
|
|
<fieldsynopsis>
|
|
<modifier>const</modifier>
|
|
<type>int</type>
|
|
<varname linkend="event.constants.et">Event::ET</varname>
|
|
<initializer>32</initializer>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>const</modifier>
|
|
<type>int</type>
|
|
<varname linkend="event.constants.persist">Event::PERSIST</varname>
|
|
<initializer>16</initializer>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>const</modifier>
|
|
<type>int</type>
|
|
<varname linkend="event.constants.read">Event::READ</varname>
|
|
<initializer>2</initializer>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>const</modifier>
|
|
<type>int</type>
|
|
<varname linkend="event.constants.write">Event::WRITE</varname>
|
|
<initializer>4</initializer>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>const</modifier>
|
|
<type>int</type>
|
|
<varname linkend="event.constants.signal">Event::SIGNAL</varname>
|
|
<initializer>8</initializer>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>const</modifier>
|
|
<type>int</type>
|
|
<varname linkend="event.constants.timeout">Event::TIMEOUT</varname>
|
|
<initializer>1</initializer>
|
|
</fieldsynopsis>
|
|
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
|
|
<fieldsynopsis>
|
|
<modifier>public</modifier>
|
|
<modifier>readonly</modifier>
|
|
<type>bool</type>
|
|
<varname linkend="event.props.pending">pending</varname>
|
|
</fieldsynopsis>
|
|
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
|
|
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.event')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
|
</classsynopsis>
|
|
<!-- }}} -->
|
|
</section>
|
|
<!-- {{{ Event properties -->
|
|
<section xml:id="event.props">
|
|
&reftitle.properties;
|
|
<variablelist>
|
|
<varlistentry xml:id="event.props.pending">
|
|
<term>
|
|
<varname>pending</varname>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Whether event is pending. See
|
|
<link linkend="event.persistence">About event persistence</link>
|
|
.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</section>
|
|
<!-- }}} -->
|
|
<!-- {{{ Event constants -->
|
|
<section xml:id="event.constants">
|
|
&reftitle.constants;
|
|
<variablelist>
|
|
<varlistentry xml:id="event.constants.et">
|
|
<term>
|
|
<constant>Event::ET</constant>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Indicates that the event should be edge-triggered, if the underlying
|
|
event base backend supports edge-triggered events. This affects the
|
|
semantics of
|
|
<constant>Event::READ</constant>
|
|
and
|
|
<constant>Event::WRITE</constant>
|
|
.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="event.constants.persist">
|
|
<term>
|
|
<constant>Event::PERSIST</constant>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Indicates that the event is persistent. See
|
|
<link linkend="event.persistence">About event persistence</link>
|
|
.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="event.constants.read">
|
|
<term>
|
|
<constant>Event::READ</constant>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This flag indicates an event that becomes active when the provided file
|
|
descriptor(usually a stream resource, or socket) is ready for reading.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="event.constants.write">
|
|
<term>
|
|
<constant>Event::WRITE</constant>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This flag indicates an event that becomes active when the provided file
|
|
descriptor(usually a stream resource, or socket) is ready for reading.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="event.constants.signal">
|
|
<term>
|
|
<constant>Event::SIGNAL</constant>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Used to implement signal detection. See "Constructing signal events"
|
|
below.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="event.constants.timeout">
|
|
<term>
|
|
<constant>Event::TIMEOUT</constant>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This flag indicates an event that becomes active after a timeout
|
|
elapses.
|
|
</para>
|
|
<para>
|
|
The
|
|
<constant>Event::TIMEOUT</constant>
|
|
flag is ignored when constructing an event: one can either set a
|
|
timeout when event is
|
|
<emphasis>added</emphasis>
|
|
, or not. It is set in the
|
|
<literal>$what</literal>
|
|
argument to the callback function when a timeout has occurred.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</section>
|
|
<!-- }}} -->
|
|
</partintro>
|
|
|
|
&reference.event.entities.event;
|
|
|
|
</phpdoc:classref>
|
|
<!-- 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
|
|
-->
|