From c4c65027dd5ed8fdda66c9ac89a69343b8da3562 Mon Sep 17 00:00:00 2001 From: Daniel Lowrey Date: Tue, 22 Apr 2014 20:49:05 -0400 Subject: [PATCH] Removed unnecessary clutter --- lib/LibeventReactor.php | 11 ----------- lib/LibeventWatcher.php | 3 --- 2 files changed, 14 deletions(-) diff --git a/lib/LibeventReactor.php b/lib/LibeventReactor.php index 17329ed..e383973 100755 --- a/lib/LibeventReactor.php +++ b/lib/LibeventReactor.php @@ -13,11 +13,6 @@ class LibeventReactor implements Reactor { private $gcEvent; private $stopException; - private static $TYPE_STREAM = 0; - private static $TYPE_ONCE = 1; - private static $TYPE_REPEATING = 2; - private static $TYPE_SIGNAL = 3; - public function __construct() { $this->lastWatcherId = PHP_INT_MAX * -1; $this->base = event_base_new(); @@ -85,7 +80,6 @@ class LibeventReactor implements Reactor { $watcher = new LibeventWatcher; $watcher->id = $watcherId; - $watcher->type = self::$TYPE_ONCE; $watcher->eventResource = $eventResource; $watcher->interval = $delay; $watcher->callback = $callback; @@ -123,11 +117,9 @@ class LibeventReactor implements Reactor { $watcher = new LibeventWatcher; $watcher->id = $watcherId; - $watcher->type = self::$TYPE_REPEATING; $watcher->eventResource = $eventResource; $watcher->interval = $interval; $watcher->callback = $callback; - $watcher->isRepeating = true; $watcher->wrapper = $this->wrapRepeatingCallback($watcher); @@ -171,9 +163,7 @@ class LibeventReactor implements Reactor { $watcher = new LibeventWatcher; $watcher->id = $watcherId; - $watcher->type = self::$TYPE_STREAM; $watcher->stream = $stream; - $watcher->streamFlags = $flags; $watcher->callback = $callback; $watcher->wrapper = $this->wrapStreamCallback($watcher); $watcher->isEnabled = (bool) $enableNow; @@ -210,7 +200,6 @@ class LibeventReactor implements Reactor { $eventResource = event_new(); $watcher = new LibeventWatcher; $watcher->id = $watcherId; - $watcher->type = self::$TYPE_SIGNAL; $watcher->eventResource = $eventResource; $watcher->callback = $callback; diff --git a/lib/LibeventWatcher.php b/lib/LibeventWatcher.php index 6f20e3c..e7c7580 100755 --- a/lib/LibeventWatcher.php +++ b/lib/LibeventWatcher.php @@ -4,13 +4,10 @@ namespace Alert; class LibeventWatcher { public $id; - public $type; public $eventResource; public $stream; - public $streamFlags; public $callback; public $wrapper; public $interval = -1; public $isEnabled = TRUE; - public $isRepeating = FALSE; }