[Sync-EN] Optimize the Swoole event documentation - #1806
Open
lacatoire wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs the
reference/swoole/event pages with php/doc-en#4774.The
Swoole\Eventpages were essentially empty stubs: the class intro, every method description and almost every parameter description held an empty paragraph. They are now translated in full:swoole.event.xml: the intro explains that the extension exposes the underlying epoll/kqueue/poll/select loop and lets sockets from other extensions join it, with the note that the module is low-level. Two new sections are added: event priority, and the four accepted socket types (fd, stream resource, socket resource, object).Swoole\Event::add(),del(),set(),wait(),write(),defer(): full descriptions, parameters, return values, examples and the accompanying notes and warnings, including that a socket cannot be added twice, thatdel()must be called before closing a socket to avoid leaks, theset()callback replacement rules, and thewrite()buffer overflow behaviour and SSL restriction.Swoole\Event::cycle(),Swoole\Event::dispatch()andSwoole\Event::isset(), translating the three new pages.swoole/event/exit.xml, as upstream; the proceduralswoole_event_exit()page is untouched.The
add()andset()synopses also gain the correct types:sockismixed, notint/string, and the fourth parameter isflagsof typeint, noteventsof typestring.EN-Revision bumped to 282797eedc7c7bca6a6f55a9aad32b135feb3320 on the affected files.
Fixes: #1618