summaryrefslogtreecommitdiffstats
path: root/vendor/cweagans/composer-patches/src/PatchEvent.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/cweagans/composer-patches/src/PatchEvent.php')
-rw-r--r--vendor/cweagans/composer-patches/src/PatchEvent.php70
1 files changed, 70 insertions, 0 deletions
diff --git a/vendor/cweagans/composer-patches/src/PatchEvent.php b/vendor/cweagans/composer-patches/src/PatchEvent.php
new file mode 100644
index 0000000..31d36f8
--- /dev/null
+++ b/vendor/cweagans/composer-patches/src/PatchEvent.php
@@ -0,0 +1,70 @@
+<?php
+
+/**
+ * @file
+ * Dispatch events when patches are applied.
+ */
+
+namespace cweagans\Composer;
+
+use Composer\EventDispatcher\Event;
+use Composer\Package\PackageInterface;
+
+class PatchEvent extends Event {
+
+ /**
+ * @var PackageInterface $package
+ */
+ protected $package;
+ /**
+ * @var string $url
+ */
+ protected $url;
+ /**
+ * @var string $description
+ */
+ protected $description;
+
+ /**
+ * Constructs a PatchEvent object.
+ *
+ * @param string $eventName
+ * @param PackageInterface $package
+ * @param string $url
+ * @param string $description
+ */
+ public function __construct($eventName, PackageInterface $package, $url, $description) {
+ parent::__construct($eventName);
+ $this->package = $package;
+ $this->url = $url;
+ $this->description = $description;
+ }
+
+ /**
+ * Returns the package that is patched.
+ *
+ * @return PackageInterface
+ */
+ public function getPackage() {
+ return $this->package;
+ }
+
+ /**
+ * Returns the url of the patch.
+ *
+ * @return string
+ */
+ public function getUrl() {
+ return $this->url;
+ }
+
+ /**
+ * Returns the description of the patch.
+ *
+ * @return string
+ */
+ public function getDescription() {
+ return $this->description;
+ }
+
+}