����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 3.138.123.143 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/Tus/ |
Upload File : |
<?php namespace TusPhp\Tus; use TusPhp\Cache\Cacheable; use TusPhp\Cache\CacheFactory; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; abstract class AbstractTus { /** @const string Tus protocol version. */ public const TUS_PROTOCOL_VERSION = '1.0.0'; /** @const string Upload type partial. */ public const UPLOAD_TYPE_PARTIAL = 'partial'; /** @const string Upload type final. */ public const UPLOAD_TYPE_FINAL = 'final'; /** @const string Name separator for partial upload. */ protected const PARTIAL_UPLOAD_NAME_SEPARATOR = '_'; /** @const string Upload type normal. */ protected const UPLOAD_TYPE_NORMAL = 'normal'; /** @const string Header Content Type */ protected const HEADER_CONTENT_TYPE = 'application/offset+octet-stream'; /** @var Cacheable */ protected $cache; /** @var string */ protected $apiPath = '/files'; /** @var EventDispatcherInterface */ protected $dispatcher; /** * Set cache. * * @param mixed $cache * * @throws \ReflectionException * * @return self */ public function setCache($cache): self { if (\is_string($cache)) { $this->cache = CacheFactory::make($cache); } elseif ($cache instanceof Cacheable) { $this->cache = $cache; } $prefix = 'tus:' . strtolower((new \ReflectionClass(static::class))->getShortName()) . ':'; $this->cache->setPrefix($prefix); return $this; } /** * Get cache. * * @return Cacheable */ public function getCache(): Cacheable { return $this->cache; } /** * Set API path. * * @param string $path * * @return self */ public function setApiPath(string $path): self { $this->apiPath = $path; return $this; } /** * Get API path. * * @return string */ public function getApiPath(): string { return $this->apiPath; } /** * Set and get event dispatcher. * * @return EventDispatcherInterface */ public function event(): EventDispatcherInterface { if ( ! $this->dispatcher) { $this->dispatcher = new EventDispatcher(); } return $this->dispatcher; } /** * Set event dispatcher. * * @param EventDispatcherInterface $dispatcher * * @return self */ public function setDispatcher(EventDispatcherInterface $dispatcher): self { $this->dispatcher = $dispatcher; return $this; } }