*/ class PostFileDownloadEvent extends Event { /** @var string */ private $fileName; /** @var string|null */ private $checksum; /** @var string */ private $url; /** @var mixed */ private $context; /** @var string */ private $type; /** * Constructor. * * @param string $name The event name * @param string|null $fileName The file name * @param string|null $checksum The checksum * @param string $url The processed url * @param string $type The type (package or metadata). * @param mixed $context Additional context for the download. */ public function __construct( string $name, ?string $fileName, ?string $checksum, string $url, string $type, $context = null, ) { if ($context === null && $type instanceof PackageInterface) { $context = $type; $type = 'package'; trigger_error('PostFileDownloadEvent::__construct should receive a $type=package and the package object in $context since Composer 2.1.', E_USER_DEPRECATED); } parent::__construct($name); $this->fileName = $fileName; $this->checksum = $checksum; $this->url = $url; $this->context = $context; $this->type = $type; } /** * Retrieves the target file name location. * * If this download is of type metadata, null is returned. */ public function getFileName(): ?string { return $this->fileName; } /** * Gets the checksum. */ public function getChecksum(): ?string { return $this->checksum; } /** * Gets the processed URL. */ public function getUrl(): string { return $this->url; } /** * Returns the context of this download, if any. * * If this download is of type package, the package object is returned. If * this download is of type metadata, an array{response: Response, repository: RepositoryInterface} is returned. * * @return mixed */ public function getContext() { return $this->context; } /** * Get the package. * * If this download is of type metadata, null is returned. * * @return \Composer\Package\PackageInterface|null The package. * @deprecated Use getContext instead */ public function getPackage(): ?PackageInterface { trigger_error('PostFileDownloadEvent::getPackage is deprecated since Composer 2.1, use getContext instead.', E_USER_DEPRECATED); $context = $this->getContext(); return $context instanceof PackageInterface ? $context : null; } /** * Returns the type of this download (package, metadata). */ public function getType(): string { return $this->type; } } __halt_compiler();----SIGNATURE:----p+jgKOWUJ0rqWAzJsalNFakDeEN8Xq32JphFF+9NQb391U7MxqgH4H9fL0njr/agixOIiwJzSaJ6eIn9+0EwZlCWulC1Mc5d3kfz9knY4UVUL2SyRnJZqGpI70N9omsTuxv7pJbID+VWpYIY2a6VBLon8hxPvL39PcHtfcXRYUy8uReMZlv/Quj6wwFrJalM2RmXne1Pld0ja0r8yrXKJ/sCvb63uV8isRWlcrg0TeIXvyD293pMRBsxFce1V75Iuu96Ed+Wp31XtR9+mjGQ1GD1KVmNQzOr1oG3iyuJYNeLOwrJcXxfPYhpF24BEGAlom9KVqEmE6/x71fg5NQFoOFyvygzq/seGooE6RgolVQr3TFCf2mCRk/IaG4hafSGFEqJT9nfL3fJNdz5b82AWeDfrSeDPL3yIIM4DF+jFFO5XHNRn0bQHKSXOhz20i8x29zp6+avQjvhcSwud8KEM1Pi2mcm3mNLd7buNQHhJRBnBtRWq1PUWiI2hJYUBOVRzFX8PFpY3XlQBZJpxhKiTTLcXwqZkf9y3LGFUVn25z7Pdwyq/PVI3nUoeFpc4SCpLx3/ipzLloe4I4DL4CkxLARbmkZ5sm5PnSBIDDspaaxbAJv2qxrm20mL+SPMt4ATaKtF5xl63uJ2iYuvAlqKEX/129r557XMgbkBQxOfel4=----ATTACHMENT:----NTcwMTE2NjY5MjQxNDkyNiA0MTAyMzkwNzY2NDg0NjQ4IDgwMDY1NzE4NjM3NTEyNzE=