Skip to content

Commit

Permalink
Restructured docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Apr 22, 2018
1 parent b7e08f7 commit ff548f9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 62 deletions.
19 changes: 16 additions & 3 deletions .docs/application.md → .docs/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Event Dispatcher > Nette Application Bridge
# Event Dispatcher Extra :recycle:

## Content :gift:

- [Usage - how to register](#usage-tada)
- [Bridge - nette application](#bridge-wrench)
- [Bridge - events list](#bridge-wrench)
- [Command - example command](#subscriber-bulb)

## Usage :tada:
Expand All @@ -12,11 +12,14 @@
extensions:
events: Contributte\EventDispatcher\DI\EventDispatcherExtension
events2application: Contributte\Events\Extra\Application\DI\EventApplicationBridgeExtension
events2security: Contributte\Events\Extra\Security\DI\EventSecurityBridgeExtension
```

## Bridge :wrench:

There are several Nette Application events on which you can listen to.
There are several events on which you can listen to.

**Nette Application events:**

```php
use Contributte\Events\Extra\Application\Event\ApplicationEvents;
Expand All @@ -35,6 +38,16 @@ use Contributte\Events\Extra\Application\Event\StartupEvent;
- `ResponseEvent::NAME` && `ApplicationEvents::ON_RESPONSE`
- `ErrorEvent::NAME` && `ApplicationEvents::ON_ERROR`

**Nette Security events:**

```php
use Contributte\Events\Extra\Security\Event\LoggedInEvent;
use Contributte\Events\Extra\Security\Event\LoggedOutEvent;
```

- `LoggedInEvent::NAME` && `SecurityEvents::ON_LOGGED_IN`
- `LoggedOutEvent::NAME` && `SecurityEvents::ON_LOGGED_OUT`

## Subscriber :bulb:

```php
Expand Down
57 changes: 0 additions & 57 deletions .docs/security.md

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ composer require contributte/event-dispatcher-extra

## Overview

- [Nette/Application bridge](https://github.com/contributte/event-dispatcher-extra/blob/master/.docs/application.md#usage-tada)
- [Nette/Security bridge](https://github.com/contributte/event-dispatcher-extra/blob/master/.docs/security.md#usage-tada)
- [Usage - how to register](https://github.com/contributte/event-dispatcher-extra/blob/master/.docs/README.md#usage-tada)
- [Bridge - events list](https://github.com/contributte/event-dispatcher-extra/blob/master/.docs/README.md#bridge-wrench)
- [Command - example command](https://github.com/contributte/event-dispatcher-extra/blob/master/.docs/README.md#subscriber-bulb)

## Maintainers

Expand Down

0 comments on commit ff548f9

Please sign in to comment.