Skip to content

Commit b213e33

Browse files
committed
[EventLoop] Factory more implementations
1 parent f7f1921 commit b213e33

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/React/EventLoop/Factory.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
namespace React\EventLoop;
44

5-
use React\EventLoop\StreamSelectLoop;
6-
use React\EventLoop\LibEventLoop;
7-
85
class Factory
96
{
107
public static function create()
118
{
129
// @codeCoverageIgnoreStart
1310
if (function_exists('event_base_new')) {
1411
return new LibEventLoop();
12+
} else if (class_exists('libev\EventLoop')) {
13+
return new LibEvLoop;
14+
} else if (class_exists('EventBase')) {
15+
return new ExtEventLoop;
1516
}
1617

1718
return new StreamSelectLoop();

0 commit comments

Comments
 (0)