Swoole-src: Swoole\Http\Server swoole_http_server is same?

Created on 9 Jan 2018  ·  4Comments  ·  Source: swoole/swoole-src

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.

    I see use Swoole\Http\Server but not swoole_http_server in readme document.

    It means i can use Swoole\Server or Swoole\Client too ? I want know how many class i can use by the namespace way.

  2. What did you expect to see?

    Changelog about this.

  3. What did you see instead?

    none.

  4. What version of Swoole are you using (php --ri swoole)?

    none.

  5. What is your machine environment used (including version of kernel & php & gcc) ?

    none.

  6. If you are using ssl, what is your openssl version?

    none.

question

Most helpful comment

| Class | Alias |
| -------------------------- | ------------------------------- |
| swoole_server | Swoole\Server |
| swoole_timer | Swoole\Timer |
| swoole_event | Swoole\Event |
| swoole_async | Swoole\Async |
| swoole_connection_iterator | Swoole\Connection\Iterator |
| swoole_exception | Swoole\Exception |
| swoole_atomic | Swoole\Atomic |
| swoole_atomic_long | Swoole\Atomic\Long |
| swoole_buffer | Swoole\Buffer |
| swoole_channel | Swoole\Channel |
| swoole_client | Swoole\Client |
| swoole_client_coro | Swoole\Client |
| swoole_http_client | Swoole\Http\Client |
| swoole_http_client_coro | Swoole\Coroutine\Http\Client |
| swoole_http_server | Swoole\Http\Server |
| swoole_http_response | Swoole\Http\Response |
| swoole_http_request | Swoole\Http\Request |
| swoole_http2_client | Swoole\Http2\Client |
| swoole_http2_response | Swoole\Http2\Response |
| swoole_lock | Swoole\Lock |
| swoole_mmap | Swoole\Mmap |
| swoole_mysql | Swoole\MySQL |
| swoole_mysql_exception | Swoole\MySQL\Exception |
| swoole_process | Swoole\Process |
| swoole_redis | Swoole\Redis |
| swoole_redis_server | Swoole\Redis\Server |
| swoole_serialize | Swoole\Serialize |
| swoole_server_port | Swoole\Server\Port |
| swoole_table | Swoole\Table |
| swoole_table_row | Swoole\Table\Row |
| swoole_websocket_server | Swoole\WebSocket\Server |
| swoole_websocket_frame | Swoole\WebSocket\Frame |

replace SWOOLE_CLASS_ALIAS\(([\w_]+), *"([\w\\]+)"\); to |$1|$2|

it's full-fledged version.
Rango can consider completing Alias for coroutine Class.

All 4 comments

Yes, swoole_http_server is an alias for Swoole\Http\Server

Class Alias
swoole_serverSwoole\Server
swoole_clientSwoole\Client
swoole_processSwoole\Process
swoole_timerSwoole\Timer
swoole_tableSwoole\Table
swoole_lockSwoole\Lock
swoole_atomicSwoole\Atomic
swoole_bufferSwoole\Buffer
swoole_redisSwoole\Redis
swoole_eventSwoole\Event
swoole_mysqlSwoole\MySQL
swoole_mmapSwoole\Mmap
swoole_channelSwoole\Channel
swoole_serializeSwoole\Serialize
swoole_http_serverSwoole\Http\Server
swoole_http_clientSwoole\Http\Client
swoole_http_requestSwoole\Http\Request
swoole_http_responseSwoole\Http\Response
swoole_websocket_serverSwoole\WebSocket\Server

Thanks, It's excellent.

| Class | Alias |
| -------------------------- | ------------------------------- |
| swoole_server | Swoole\Server |
| swoole_timer | Swoole\Timer |
| swoole_event | Swoole\Event |
| swoole_async | Swoole\Async |
| swoole_connection_iterator | Swoole\Connection\Iterator |
| swoole_exception | Swoole\Exception |
| swoole_atomic | Swoole\Atomic |
| swoole_atomic_long | Swoole\Atomic\Long |
| swoole_buffer | Swoole\Buffer |
| swoole_channel | Swoole\Channel |
| swoole_client | Swoole\Client |
| swoole_client_coro | Swoole\Client |
| swoole_http_client | Swoole\Http\Client |
| swoole_http_client_coro | Swoole\Coroutine\Http\Client |
| swoole_http_server | Swoole\Http\Server |
| swoole_http_response | Swoole\Http\Response |
| swoole_http_request | Swoole\Http\Request |
| swoole_http2_client | Swoole\Http2\Client |
| swoole_http2_response | Swoole\Http2\Response |
| swoole_lock | Swoole\Lock |
| swoole_mmap | Swoole\Mmap |
| swoole_mysql | Swoole\MySQL |
| swoole_mysql_exception | Swoole\MySQL\Exception |
| swoole_process | Swoole\Process |
| swoole_redis | Swoole\Redis |
| swoole_redis_server | Swoole\Redis\Server |
| swoole_serialize | Swoole\Serialize |
| swoole_server_port | Swoole\Server\Port |
| swoole_table | Swoole\Table |
| swoole_table_row | Swoole\Table\Row |
| swoole_websocket_server | Swoole\WebSocket\Server |
| swoole_websocket_frame | Swoole\WebSocket\Frame |

replace SWOOLE_CLASS_ALIAS\(([\w_]+), *"([\w\\]+)"\); to |$1|$2|

it's full-fledged version.
Rango can consider completing Alias for coroutine Class.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jerryli1 picture jerryli1  ·  4Comments

andreybolonin picture andreybolonin  ·  4Comments

chenye2017 picture chenye2017  ·  3Comments

pthreat picture pthreat  ·  3Comments

morozovsk picture morozovsk  ·  3Comments