mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 17:59:21 +02:00
21 lines
482 B
PHP
21 lines
482 B
PHP
<?php
|
|
|
|
namespace React\EventLoop;
|
|
|
|
class Factory
|
|
{
|
|
public static function create()
|
|
{
|
|
// @codeCoverageIgnoreStart
|
|
if (function_exists('event_base_new')) {
|
|
return new LibEventLoop();
|
|
} else if (class_exists('libev\EventLoop')) {
|
|
return new LibEvLoop;
|
|
} else if (class_exists('EventBase')) {
|
|
return new ExtEventLoop;
|
|
}
|
|
|
|
return new StreamSelectLoop();
|
|
// @codeCoverageIgnoreEnd
|
|
}
|
|
}
|