PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

Event callbacks | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

Event callbacks

If a callback is registered for an event, it will be called when the event becomes active. To associate a callback with event one can pass a callable to either Event::__construct() , or Event::set() , or one of the factory methods like Event::timer() .

An event callback should match the following prototype:

void callback ([ mixed $fd = NULL [, int $what [, mixed $arg = NULL ]]] )

fd

The file descriptor, stream resource or socket associated with the event. For signal event fd is equal to the signal number.

what

Bit mask of all events triggered.

arg

User custom data.

Event::timer() expects the callback to match the following prototype:

void callback ([ mixed $arg = NULL ] )

arg

User custom data.

Event::signal() expects the callback to match the following prototype:

void callback ([ int $signum [, mixed $arg = NULL ]] )

signum

The number of the triggered signal(e.g. SIGTERM ).

arg

User custom data.


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「Event callbacks」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | Event callbacks」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: