Permalink
Browse files

create an Event class, update interface

  • Loading branch information...
iampersistent committed Jul 16, 2012
1 parent 30eadd6 commit 5c1342d056c14512a683ce6b36ccb60a3bd06227
Showing with 40 additions and 1 deletion.
  1. +37 −0 lib/Vespolina/EventDispatcher/Event.php
  2. +3 −1 lib/Vespolina/EventDispatcher/EventInterface.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * (c) 2012 Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace Vespolina\EventDispatcher;
+
+use Vespolina\EventDispatcher\EventInterface;
+
+class Event implements EventInterface
+{
+ protected $name;
+ protected $subject;
+
+ public function __construct($subject)
+ {
+ $this->subject = $subject;
+ }
+
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ public function setName($name)
+ {
+ $this->name = $name;
+ }
+
+ public function getSubject()
+ {
+ return $this->subject;
+ }
+}
@@ -12,5 +12,7 @@
{
function getName();
- function setName();
+ function setName($name);
+
+ function getSubject();
}

0 comments on commit 5c1342d

Please sign in to comment.