From c20b0ba6f0006ba20536f2f7927ffad0e2c51122 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Tue, 12 Mar 2024 15:14:35 +0100 Subject: [PATCH] Add context dependency container --- inc/context.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 inc/context.php diff --git a/inc/context.php b/inc/context.php new file mode 100644 index 00000000..5e540bab --- /dev/null +++ b/inc/context.php @@ -0,0 +1,28 @@ +config = $config; + } + + public function getHttpDriver(): HttpDriver { + if (is_null($this->http)) { + $this->http = HttpDrivers::getHttpDriver($this->config['upload_by_url_timeout'], $this->config['max_filesize']); + } + return $this->http; + } +}