5 * Dispatch events when patches are applied.
8 namespace cweagans\Composer;
10 use Composer\EventDispatcher\Event;
11 use Composer\Package\PackageInterface;
13 class PatchEvent extends Event {
16 * @var PackageInterface $package
24 * @var string $description
26 protected $description;
29 * Constructs a PatchEvent object.
31 * @param string $eventName
32 * @param PackageInterface $package
34 * @param string $description
36 public function __construct($eventName, PackageInterface $package, $url, $description) {
37 parent::__construct($eventName);
38 $this->package = $package;
40 $this->description = $description;
44 * Returns the package that is patched.
46 * @return PackageInterface
48 public function getPackage() {
49 return $this->package;
53 * Returns the url of the patch.
57 public function getUrl() {
62 * Returns the description of the patch.
66 public function getDescription() {
67 return $this->description;