PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 2.3.0
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v2.3.0
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / vendor / cweagans / composer-patches / src / PatchEvent.php

PatchEvent.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.3.0, at vendor/cweagans/composer-patches/src/PatchEvent.php

71 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 }
71