mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-30 18:24:29 +01:00
http-driver.php: rename to HttpDriver
This commit is contained in:
parent
3eed312b6b
commit
1682272f75
@ -1,9 +1,12 @@
|
||||
<?php // Honestly this is just a wrapper for cURL. Still useful to mock it and have an OOP API on PHP 7.
|
||||
<?php
|
||||
namespace Vichan\Data\Driver;
|
||||
|
||||
defined('TINYBOARD') or exit;
|
||||
|
||||
|
||||
/**
|
||||
* Honestly this is just a wrapper for cURL. Still useful to mock it and have an OOP API on PHP 7.
|
||||
*/
|
||||
class HttpDriver {
|
||||
private mixed $inner;
|
||||
private int $timeout;
|
@ -3,7 +3,7 @@ namespace Vichan;
|
||||
|
||||
use RuntimeException;
|
||||
use Vichan\Driver\{Log, LogDrivers};
|
||||
use Vichan\Data\Driver\{HttpDriver, HttpDrivers};
|
||||
use Vichan\Data\Driver\HttpDriver;
|
||||
use Vichan\Service\HCaptchaQuery;
|
||||
use Vichan\Service\NativeCaptchaQuery;
|
||||
use Vichan\Service\ReCaptchaQuery;
|
||||
@ -57,7 +57,7 @@ function build_context(array $config): Context {
|
||||
},
|
||||
HttpDriver::class => function($c) {
|
||||
$config = $c->get('config');
|
||||
return HttpDrivers::getHttpDriver($config['upload_by_url_timeout'], $config['max_filesize']);
|
||||
return new HttpDriver($config['upload_by_url_timeout'], $config['max_filesize']);
|
||||
},
|
||||
RemoteCaptchaQuery::class => function($c) {
|
||||
$config = $c->get('config');
|
||||
|
Loading…
Reference in New Issue
Block a user