Commits

Thomas Weinert committed 99a7361

Define interfaces for classes that use the aggregation

  • Participants
  • Parent commits e33f1ff

Comments (0)

Files changed (8)

File src/Carica/Io/Event/HasLoop.php

      * @param Event\Loop $loop
      * @return Event\Loop
      */
-    function events(Event\Loop $loop = NULL);
+    function loop(Event\Loop $loop = NULL);
   }
 }

File src/Carica/Io/Network/Connection.php

 
   use Carica\Io;
 
-  class Connection {
+  class Connection
+    implements
+      Io\Event\HasEmitter,
+      Io\Event\HasLoop {
 
     use Io\Event\Emitter\Aggregation;
     use Io\Event\Loop\Aggregation;

File src/Carica/Io/Network/Http/Response/Content/File.php

   use Carica\Io\Network;
   use Carica\Io\Network\Http\Response;
 
-  class File extends Response\Content {
+  class File
+    extends
+      Response\Content
+    implements
+      Io\Event\HasLoop {
 
     use Io\FileSystem\Aggregation;
     use Io\Event\Loop\Aggregation;

File src/Carica/Io/Network/Server.php

 
   use Carica\Io;
 
-  class Server {
+  class Server
+    implements
+      Io\Event\HasEmitter,
+      Io\Event\HasLoop {
 
     use Io\Event\Emitter\Aggregation;
     use Io\Event\Loop\Aggregation;

File src/Carica/Io/Stream/File.php

   use Carica\Io;
   use Carica\Io\Event;
 
-  class File implements Io\Stream {
+  class File
+    implements
+      Io\Stream,
+      Io\Event\HasLoop {
 
     use Event\Emitter\Aggregation;
     use Event\Loop\Aggregation;

File src/Carica/Io/Stream/Serial.php

   use Carica\Io;
   use Carica\Io\Event;
 
-  class Serial implements Io\Stream {
+  class Serial
+    implements
+      Io\Stream,
+      Io\Event\HasLoop {
 
     use Event\Emitter\Aggregation;
     use Event\Loop\Aggregation;

File src/Carica/Io/Stream/Serial/Dio.php

   use Carica\Io;
   use Carica\Io\Event;
 
-  class Dio implements Io\Stream
-  {
+  class Dio
+    implements
+      Io\Stream,
+      Io\Event\HasLoop {
 
     use Event\Emitter\Aggregation;
     use Event\Loop\Aggregation;

File src/Carica/Io/Stream/Tcp.php

   use Carica\Io;
   use Carica\Io\Event;
 
-  class Tcp implements Io\Stream {
+  class Tcp
+    implements
+      Io\Stream,
+      Io\Event\HasLoop {
 
     use Event\Emitter\Aggregation;
     use Event\Loop\Aggregation;