*/ 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, ) { /** @phpstan-ignore instanceof.alwaysFalse, booleanAnd.alwaysFalse */ 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:----sbNFyOjpYHpKM7eGQkTU6to6lDUmgfGp6m+JmXhSddrC5o6kG50OKFKMIo6m6quA4d1D1r4WYn/yU/IaO5J6tBkpvaJv9KMN8/YVYrc+pE6uD7VME7Zif32mekkN+QbPL7I+0pqzOukad7uaaxRZG8QLN8RJ5qh70bFLgLAmZ5e4Yh8SlmtOD9ufGjpvSQD/kmraCJLq7TyYfX2yXpmTPxMnRBZGHto8pFmJ9cFUHcv5EigasTQ/Ubtt0iQPEt+5MI++5YW5USIBDKXntcpeFQmYt0xZE2G9gmV6TCQvGId+aAF5YIinFwB7033EJgpHqM+FQBggvj2wccjyE+2ON0t6HE2sKKwISNi5s5vrb71Kuaw8mijyKoTLCMAl6MkYGRfBHti8F88gKQ73GDCRVtwd0LFA/b68X9qKZ7ROCjZk084ZEwY/QoUosdlfOwqSGI/9NhgQLKOdrhaD12HeCCdWOMW66c+OWYlreDPjL+ZAnCDdqPHh+IPctBqLn2FGqo9okf+LmzpJ1nnD4lAEXpMl7A1f8IUSjt/ku0CCGfhRVn2etovVl0GXmV5lo9hgBgxwVXe08mBAEY7r0vxGkwyYGtMiS1I3IqUzeftK27poaxLRl4hBk07F7uN91Xw9qdtFOkT92QwETsNrpgGVuiLyCMJT2u5LM3xP56BNQPw=----ATTACHMENT:----Mzg3OTQxMzk5OTQ3NzI2MCAxNTg5OTU2MDAxMzg2NjE1IDQ0ODY0ODc2NTg5MTQzMTU=