Download the PHP package tobento/app-event without Composer
On this page you can find all versions of the php package tobento/app-event. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package app-event
App Event
Event support for the app using the Event Service.
Table of Contents
- Getting Started
- Requirements
- Documentation
- App
- Event Boot
- Event Config
- Available Event Interfaces
- Default Events
- Create Event
- Create Listener
- Add Listeners
- Dispatch Event
- Specific Events
- Create Events
- Add Specific Listeners
- Use Events
- Queue Listeners
- Credits
Getting Started
Add the latest version of the app event project running this command.
Requirements
- PHP 8.0 or greater
Documentation
App
Check out the App Skeleton if you are using the skeleton.
You may also check out the App to learn more about the app in general.
Event Boot
The event boot does the following:
- installs and loads event config file
- implements event interfaces
- adds event listeners from config file
Event Config
The configuration for the event is located in the file at the default App Skeleton config location.
Available Event Interfaces
The following interfaces are available after booting:
Check out the Event Service to learn more about the interfaces.
Default Events
You can access the default events by using the from within the app or by autowiring.
Furthermore, the events are used as the default implementation.
Create Event
Create Listener
Check out the Defining Listeners section to learn more about it.
Add Listeners
You can add listeners by the following ways:
Using event config
You may define the listener in the file:
Manually using events
You can add listeners manually by using the .
Check out the Add Listeners to learn more about adding listeners.
Dispatch Event
You can dispatch events by the following ways:
Using the event dispatcher
The uses the default events as dispatcher implementation.
Using the events
Specific Events
You may create specific events for certain services, components or bundles.
Create Events
To create specific events simply extend the :
The will be autowired while using the app!
Add Specific Listeners
You can add listeners for your specific events by the following ways:
Using event config
You may define the listener in the file:
Manually using events
You can add listeners manually by using the .
Check out the Add Listeners to learn more about adding listeners.
Using the app method
You can add listeners by using the app method.
Check out the Add Listeners to learn more about adding listeners.
Use Events
After setting up your specific events, you can use it in your service.
There are several ways to inject your events into your :
The requires no action for injection as is defined as dispatcher which gets autowired.
You may check out the App Definitions and the App On method for more information.
Queue Listeners
In progress ...
Credits
- Tobias Strub
- All Contributors
All versions of app-event with dependencies
tobento/app Version ^1.0
tobento/app-migration Version ^1.0
tobento/service-event Version ^1.0
tobento/service-dir Version ^1.0
psr/event-dispatcher Version ^1.0