Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/doc-fixes'
Browse files Browse the repository at this point in the history
Close #60
Close #65
  • Loading branch information
weierophinney committed Apr 25, 2018
2 parents b4c6ffb + e69c480 commit 98eddfd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions doc/book/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Triggered second
### triggerEvent()

```php
triggerEvent(EventInterfce $event) : ResponseCollection
triggerEvent(EventInterface $event) : ResponseCollection
```

This method is a sibling to `trigger()`, but unlike `trigger()`, it accepts an
Expand Down Expand Up @@ -216,10 +216,10 @@ $foo = $e->getParam('foo'); // How should the event know how to get this?

As such, we recommend passing either an array or an `ArrayObject` instance for
event arguments. If you pass the latter, you get the benefit of being able to
mainpulate by reference.
manipulate by reference.

`prepareArgs()` can thus be used to return an `ArrayObject` representation of
your aguments to pass to `trigger()` or `triggerUntil()`:
your arguments to pass to `trigger()` or `triggerUntil()`:

```php
$events->attach('foo', $this, $events->prepareArgs(compact('bar', 'baz')));
Expand Down Expand Up @@ -347,7 +347,7 @@ Sets the event target. `$target` may be a string or object.
### setParams()

```php
setParams($parms) : void
setParams($params) : void
```

Set the event parameters; `$params` should be an array or object implementing
Expand Down
2 changes: 1 addition & 1 deletion doc/book/migration/changed.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ $event->setTarget($this);
$events->triggerEvent($event);
```

If you are using a callback to shortcircuit, use one of the `*Until()` methods,
If you are using a callback to short-circuit, use one of the `*Until()` methods,
passing the callback as the first argument:

```php
Expand Down
4 changes: 2 additions & 2 deletions doc/book/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class LogEvents implements ListenerAggregateInterface
$this->listeners[] = $events->attach('doSomethingElse', [$this, 'log']);
}

public function detach(EventCollection $events)
public function detach(EventManagerInterface $events)
{
foreach ($this->listeners as $index => $listener) {
$events->detach($listener);
Expand Down Expand Up @@ -358,7 +358,7 @@ execution if interesting results are obtained.

## Short-circuiting listener execution

You may want to short-ciruit execution if a particular result is obtained, or if
You may want to short-circuit execution if a particular result is obtained, or if
a listener determines that something is wrong, or that it can return something
quicker than the target.

Expand Down

0 comments on commit 98eddfd

Please sign in to comment.