1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-26 06:58:26 +01:00

http-driver.php: rename to HttpDriver

This commit is contained in:
Zankaria 2024-10-04 01:01:47 +02:00
parent 3eed312b6b
commit 1682272f75
2 changed files with 6 additions and 3 deletions

View File

@ -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; namespace Vichan\Data\Driver;
defined('TINYBOARD') or exit; 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 { class HttpDriver {
private mixed $inner; private mixed $inner;
private int $timeout; private int $timeout;

View File

@ -3,7 +3,7 @@ namespace Vichan;
use RuntimeException; use RuntimeException;
use Vichan\Driver\{Log, LogDrivers}; use Vichan\Driver\{Log, LogDrivers};
use Vichan\Data\Driver\{HttpDriver, HttpDrivers}; use Vichan\Data\Driver\HttpDriver;
use Vichan\Service\HCaptchaQuery; use Vichan\Service\HCaptchaQuery;
use Vichan\Service\NativeCaptchaQuery; use Vichan\Service\NativeCaptchaQuery;
use Vichan\Service\ReCaptchaQuery; use Vichan\Service\ReCaptchaQuery;
@ -57,7 +57,7 @@ function build_context(array $config): Context {
}, },
HttpDriver::class => function($c) { HttpDriver::class => function($c) {
$config = $c->get('config'); $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) { RemoteCaptchaQuery::class => function($c) {
$config = $c->get('config'); $config = $c->get('config');