Skip to content

Commit 83a76f4

Browse files
Readme update
1 parent f7c032e commit 83a76f4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ class ExampleListener implements IEventListener {
149149
}
150150

151151
public function hello($controller, $name) {
152-
$controller->set([
153-
"hello.message" => "Why hello $name! How you doin'? :)"
154-
]);
152+
$controller->set([
153+
"hello.message" => "Why hello $name! How you doin'? :)"
154+
]);
155155
}
156156
}
157157
```
@@ -165,7 +165,8 @@ use Planck\Core\Event\Event;
165165

166166
public function hello($name) {
167167
echo "Hello, $name";
168-
Event::emit('app.welcomed');
168+
// emit an event and pass the current object plus some more stuff. you can pass anything you want here
169+
Event::emit('app.welcomed', [$this, $moreData]);
169170
}
170171

171172
// more goodness

0 commit comments

Comments
 (0)