added new socket manager, errorhandling and testing is not finished yet
This commit is contained in:
21
libs/React/EventLoop/Factory.php
Normal file
21
libs/React/EventLoop/Factory.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace React\EventLoop;
|
||||
|
||||
class Factory
|
||||
{
|
||||
public static function create()
|
||||
{
|
||||
// @codeCoverageIgnoreStart
|
||||
if (function_exists('event_base_new')) {
|
||||
return new LibEventLoop();
|
||||
} elseif (class_exists('libev\EventLoop', false)) {
|
||||
return new LibEvLoop;
|
||||
} elseif (class_exists('EventBase', false)) {
|
||||
return new ExtEventLoop;
|
||||
}
|
||||
|
||||
return new StreamSelectLoop();
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user