Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Event

Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

The Event Component.

Example(s)

<?php

use miBadger\Event\EventListenerInterface;

/**
 * The event listener class.
 */
class EventListener implements EventListenerInterface
{
	/**
	 * {@inheritdoc}
	 */
	public function update(SubjectInterface $subject, $arguments = null)
	{
		// Action that needs to be executed if the event fires.
	}
}
<?php

use miBadger\Event\Event;

/**
 * Construct a new event.
 */
$event = new Event();

/**
 * Construct a new event listener.
 */
$eventListener = new EventListener()

/**
 * Returns true if the observer is attached successfully.
 */
$event->attach($eventListener);

/**
 * Notify all the attached observers.
 */
$event->notify();

About

The Event Component

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.