*/ 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-next-line */ 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:----bLvggNhb0uJTzd5MbJctYEBuqFyvN1CNcke+G5jrioOgzCJ4Uc5fFIaNKYhyiXnsp5XAcige5jGJADEtRC8bNyeGgfzrQ1T6BBQswGuw22bTZu/sNvORqd+AfI86UdpNfk1lwhmRanYtL9cZEUgx/W8zY5DKDzDQpZxmf3Fp7Af3Dv96xo+3r9d+9sNedkDs440HMRjb1knp3N0SlU8CDg4K2Wdmw9SiL452u4wvO+5YStxGPd4But5wxZhzb38SLfTpKlbZtERMd7l2xAl1XfyG99JQdPkxRnmONIKdIOcpSHDFcpui6I9KD0oIF6sgdRGxZ3KhAVkK0+/xC3Ebnk3NWCv4hzOO9hrClnLK+v8su5R8bZyIsT//OeKahrfLEyWa0k0BpL8752e00VrufAU1zKt6lgympe4zePUwk673fapQ4a4PJWTBjnal6tIaLaTnbNxS64G9jbaJKSZVtEaj4aMA1XSNqLcuAJwMKHZCJ2RwJMUBGiOXe9CsZ7WGYO7/JrsfMmubzEVhObaJxDrfarbcT9aWa+dYKctgx1YdR0pAWQaN7PSD6XCSi4cOnQoewaLOi+EttdgBfOG/sMHol+JVONehGHHMinUWuxFLnGss5eJmqMNChXgtPgATQwiUTS52CI4Lx6ibRXxpKlPQyq8cpLSkJ+6Jd3PQw/0=----ATTACHMENT:----Mzc0MTk3NDYxODM2MzM2NiAzOTUyMzUwNDAxNTY3NTE4IDk2MTY4MjAxNTYzMzg3NzM=