Skip to content

Commit

Permalink
Rename LibevLoop to EvLoop
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Aug 28, 2015
1 parent 6faa514 commit 51cb32f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions src/Loop/LibevLoop.php → src/Loop/EvLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
namespace Icicle\Loop;

use Icicle\Loop\Events\EventFactoryInterface;
use Icicle\Loop\Manager\Libev\AwaitManager;
use Icicle\Loop\Manager\Libev\PollManager;
use Icicle\Loop\Manager\Libev\SignalManager;
use Icicle\Loop\Manager\Libev\TimerManager;
use Icicle\Loop\Manager\Ev\AwaitManager;
use Icicle\Loop\Manager\Ev\PollManager;
use Icicle\Loop\Manager\Ev\SignalManager;
use Icicle\Loop\Manager\Ev\TimerManager;
use Icicle\Loop\Exception\UnsupportedError;

/**
* Uses the ev extension to poll sockets for I/O and create timers.
*/
class LibevLoop extends AbstractLoop
class EvLoop extends AbstractLoop
{
/**
* @var \EvLoop
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Icicle\Loop\Manager\Libev;
namespace Icicle\Loop\Manager\Ev;

use Icicle\Loop\Events\SocketEventInterface;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Icicle\Loop\Manager\Libev;
namespace Icicle\Loop\Manager\Ev;

use Icicle\Loop\Events\SocketEventInterface;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace Icicle\Loop\Manager\Libev;
namespace Icicle\Loop\Manager\Ev;

use Icicle\Loop\Events\EventFactoryInterface;
use Icicle\Loop\LibevLoop;
use Icicle\Loop\EvLoop;
use Icicle\Loop\Manager\AbstractSignalManager;

class SignalManager extends AbstractSignalManager
Expand All @@ -13,10 +13,10 @@ class SignalManager extends AbstractSignalManager
private $events = [];

/**
* @param \Icicle\Loop\LibevLoop $loop
* @param \Icicle\Loop\EvLoop $loop
* @param \Icicle\Loop\Events\EventFactoryInterface $factory
*/
public function __construct(LibevLoop $loop, EventFactoryInterface $factory)
public function __construct(EvLoop $loop, EventFactoryInterface $factory)
{
parent::__construct($loop, $factory);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
namespace Icicle\Loop\Manager\Libev;
namespace Icicle\Loop\Manager\Ev;

use Icicle\Loop\Events\EventFactoryInterface;
use Icicle\Loop\Events\SocketEventInterface;
use Icicle\Loop\LibevLoop;
use Icicle\Loop\EvLoop;
use Icicle\Loop\Exception\FreedError;
use Icicle\Loop\Exception\ResourceBusyError;
use Icicle\Loop\Manager\SocketManagerInterface;
Expand Down Expand Up @@ -54,10 +54,10 @@ abstract class SocketManager implements SocketManagerInterface
abstract protected function createEvent(\EvLoop $loop, SocketEventInterface $event, callable $callback);

/**
* @param \Icicle\Loop\LibevLoop $loop
* @param \Icicle\Loop\EvLoop $loop
* @param \Icicle\Loop\Events\EventFactoryInterface $factory
*/
public function __construct(LibevLoop $loop, EventFactoryInterface $factory)
public function __construct(EvLoop $loop, EventFactoryInterface $factory)
{
$this->factory = $factory;
$this->loop = $loop->getEvLoop();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
namespace Icicle\Loop\Manager\Libev;
namespace Icicle\Loop\Manager\Ev;

use Icicle\Loop\Events\EventFactoryInterface;
use Icicle\Loop\Events\TimerInterface;
use Icicle\Loop\LibevLoop;
use Icicle\Loop\EvLoop;
use Icicle\Loop\Manager\TimerManagerInterface;
use Icicle\Loop\Structures\ObjectStorage;

Expand Down Expand Up @@ -32,10 +32,10 @@ class TimerManager implements TimerManagerInterface
private $callback;

/**
* @param \Icicle\Loop\LibevLoop $loop
* @param \Icicle\Loop\EvLoop $loop
* @param \Icicle\Loop\Events\EventFactoryInterface $factory
*/
public function __construct(LibevLoop $loop, EventFactoryInterface $factory)
public function __construct(EvLoop $loop, EventFactoryInterface $factory)
{
$this->factory = $factory;
$this->loop = $loop->getEvLoop();
Expand Down
10 changes: 5 additions & 5 deletions tests/Loop/LibevLoopTest.php → tests/Loop/EvLoopTest.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<?php
namespace Icicle\Tests\Loop;

use Icicle\Loop\LibevLoop;
use Icicle\Loop\EvLoop;
use Icicle\Loop\Events\EventFactoryInterface;

/**
* @requires extension ev
*/
class LibevLoopTest extends AbstractLoopTest
class EvLoopTest extends AbstractLoopTest
{
protected static $base;

public static function setUpBeforeClass()
{
if (extension_loaded('event')) {
if (extension_loaded('ev')) {
self::$base = new \EvLoop();
}
}

public function createLoop(EventFactoryInterface $eventFactory)
{
return new LibevLoop(true, $eventFactory, self::$base);
return new EvLoop(true, $eventFactory, self::$base);
}

public function testEnabled()
{
$this->assertSame(extension_loaded('ev'), LibevLoop::enabled());
$this->assertSame(extension_loaded('ev'), EvLoop::enabled());
}
}

0 comments on commit 51cb32f

Please sign in to comment.