1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Turn EventDispatcher into generic solution handling plugins as well

This commit is contained in:
Nils Adermann 2013-08-14 17:42:11 +02:00
parent 2f43e9aefb
commit 3960edd64e
17 changed files with 320 additions and 68 deletions

View file

@ -16,17 +16,13 @@ use Composer\Composer;
use Composer\IO\IOInterface;
/**
* The base event class
* The script event class
*
* @author François Pluchino <francois.pluchino@opendisplay.com>
* @author Nils Adermann <naderman@naderman.de>
*/
class Event
class Event extends \Composer\EventDispatcher\Event
{
/**
* @var string This event's name
*/
private $name;
/**
* @var Composer The composer instance
*/
@ -52,22 +48,12 @@ class Event
*/
public function __construct($name, Composer $composer, IOInterface $io, $devMode = false)
{
$this->name = $name;
parent::__construct($name);
$this->composer = $composer;
$this->io = $io;
$this->devMode = $devMode;
}
/**
* Returns the event's name.
*
* @return string The event name
*/
public function getName()
{
return $this->name;
}
/**
* Returns the composer instance.
*