Added another front page space for Yaffs info. Added roave security for composer.
[yaffs-website] / vendor / cweagans / composer-patches / src / PatchEvent.php
1 <?php
2
3 /**
4  * @file
5  * Dispatch events when patches are applied.
6  */
7
8 namespace cweagans\Composer;
9
10 use Composer\EventDispatcher\Event;
11 use Composer\Package\PackageInterface;
12
13 class PatchEvent extends Event {
14
15  /**
16   * @var PackageInterface $package
17   */
18  protected $package;
19  /**
20   * @var string $url
21   */
22  protected $url;
23  /**
24   * @var string $description
25   */
26  protected $description;
27
28   /**
29    * Constructs a PatchEvent object.
30    *
31    * @param string $eventName
32    * @param PackageInterface $package
33    * @param string $url
34    * @param string $description
35    */
36   public function __construct($eventName, PackageInterface $package, $url, $description) {
37     parent::__construct($eventName);
38     $this->package = $package;
39     $this->url = $url;
40     $this->description = $description;
41   }
42
43   /**
44    * Returns the package that is patched.
45    *
46    * @return PackageInterface
47    */
48   public function getPackage() {
49     return $this->package;
50   }
51
52   /**
53    * Returns the url of the patch.
54    *
55    * @return string
56    */
57   public function getUrl() {
58     return $this->url;
59   }
60
61   /**
62    * Returns the description of the patch.
63    *
64    * @return string
65    */
66   public function getDescription() {
67     return $this->description;
68   }
69
70 }