-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provides a post download event to fix #8654
- Loading branch information
Lucas D Hedding
committed
Apr 9, 2020
1 parent
a7ad186
commit b750e9c
Showing
3 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Composer. | ||
* | ||
* (c) Nils Adermann <naderman@naderman.de> | ||
* Jordi Boggiano <j.boggiano@seld.be> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Composer\Plugin; | ||
|
||
use Composer\EventDispatcher\Event; | ||
use Composer\Util\RemoteFilesystem; | ||
|
||
/** | ||
* The post file download event. | ||
* | ||
* @author Nils Adermann <naderman@naderman.de> | ||
*/ | ||
class PostFileDownloadEvent extends Event | ||
{ | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $target; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param string $name The event name | ||
* @param string $target The target | ||
*/ | ||
public function __construct($name, $target) | ||
{ | ||
parent::__construct($name); | ||
$this->target = $target; | ||
} | ||
|
||
/** | ||
* Retrieves the target download location. | ||
* | ||
* @return string | ||
*/ | ||
public function getTarget() | ||
{ | ||
return $this->target; | ||
} | ||
} |