AbstractLoggerRequest.php
8 months ago
ActivateRequest.php
8 months ago
DeactivateRequest.php
8 months ago
InstallRequest.php
8 months ago
OptInRequest.php
8 months ago
OptOutRequest.php
8 months ago
UninstallRequest.php
8 months ago
InstallRequest.php
39 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Analyst\Http\Requests; |
| 4 | |
| 5 | use Analyst\ApiResponse; |
| 6 | use Analyst\Collector; |
| 7 | use Analyst\Contracts\RequestorContract; |
| 8 | |
| 9 | /** |
| 10 | * Class InstallRequest |
| 11 | * |
| 12 | * @since 0.9.4 |
| 13 | */ |
| 14 | class InstallRequest extends AbstractLoggerRequest |
| 15 | { |
| 16 | /** |
| 17 | * Execute the request |
| 18 | * @param RequestorContract $requestor |
| 19 | * @return ApiResponse |
| 20 | */ |
| 21 | public function execute(RequestorContract $requestor) |
| 22 | { |
| 23 | return $requestor->post('logger/install', $this->toArray()); |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Make request instance |
| 28 | * |
| 29 | * @param Collector $collector |
| 30 | * @param $pluginId |
| 31 | * @param $path |
| 32 | * @return static |
| 33 | */ |
| 34 | public static function make(Collector $collector, $pluginId, $path) |
| 35 | { |
| 36 | return new static($collector, $pluginId, $path); |
| 37 | } |
| 38 | } |
| 39 |