One Hat Cyber Team
Your IP:
216.73.216.102
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
home
/
fluxyjvi
/
public_html
/
assets
/
images
/
View File Name :
Decorator.tar
RequestDecorator.php 0000644 00000002661 15107420100 0010543 0 ustar 00 <?php namespace Http\Message\Decorator; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\UriInterface; /** * @author Márk Sági-Kazár <mark.sagikazar@gmail.com> */ trait RequestDecorator { use MessageDecorator { getMessage as getRequest; } /** * Exchanges the underlying request with another. */ public function withRequest(RequestInterface $request): RequestInterface { $new = clone $this; $new->message = $request; return $new; } public function getRequestTarget(): string { return $this->message->getRequestTarget(); } public function withRequestTarget(string $requestTarget): RequestInterface { $new = clone $this; $new->message = $this->message->withRequestTarget($requestTarget); return $new; } public function getMethod(): string { return $this->message->getMethod(); } public function withMethod(string $method): RequestInterface { $new = clone $this; $new->message = $this->message->withMethod($method); return $new; } public function getUri(): UriInterface { return $this->message->getUri(); } public function withUri(UriInterface $uri, bool $preserveHost = false): RequestInterface { $new = clone $this; $new->message = $this->message->withUri($uri, $preserveHost); return $new; } } ResponseDecorator.php 0000644 00000001642 15107420100 0010707 0 ustar 00 <?php namespace Http\Message\Decorator; use Psr\Http\Message\ResponseInterface; /** * @author Márk Sági-Kazár <mark.sagikazar@gmail.com> */ trait ResponseDecorator { use MessageDecorator { getMessage as getResponse; } /** * Exchanges the underlying response with another. */ public function withResponse(ResponseInterface $response): ResponseInterface { $new = clone $this; $new->message = $response; return $new; } public function getStatusCode(): int { return $this->message->getStatusCode(); } public function withStatus(int $code, string $reasonPhrase = ''): ResponseInterface { $new = clone $this; $new->message = $this->message->withStatus($code, $reasonPhrase); return $new; } public function getReasonPhrase(): string { return $this->message->getReasonPhrase(); } } MessageDecorator.php 0000644 00000004315 15107420100 0010475 0 ustar 00 <?php namespace Http\Message\Decorator; use Psr\Http\Message\MessageInterface; use Psr\Http\Message\StreamInterface; /** * @author Márk Sági-Kazár <mark.sagikazar@gmail.com> */ trait MessageDecorator { /** * @var MessageInterface */ private $message; /** * Returns the decorated message. * * Since the underlying Message is immutable as well * exposing it is not an issue, because it's state cannot be altered */ public function getMessage(): MessageInterface { return $this->message; } public function getProtocolVersion(): string { return $this->message->getProtocolVersion(); } public function withProtocolVersion(string $version): MessageInterface { $new = clone $this; $new->message = $this->message->withProtocolVersion($version); return $new; } public function getHeaders(): array { return $this->message->getHeaders(); } public function hasHeader(string $header): bool { return $this->message->hasHeader($header); } public function getHeader(string $header): array { return $this->message->getHeader($header); } public function getHeaderLine(string $header): string { return $this->message->getHeaderLine($header); } public function withHeader(string $header, $value): MessageInterface { $new = clone $this; $new->message = $this->message->withHeader($header, $value); return $new; } public function withAddedHeader(string $header, $value): MessageInterface { $new = clone $this; $new->message = $this->message->withAddedHeader($header, $value); return $new; } public function withoutHeader(string $header): MessageInterface { $new = clone $this; $new->message = $this->message->withoutHeader($header); return $new; } public function getBody(): StreamInterface { return $this->message->getBody(); } public function withBody(StreamInterface $body): MessageInterface { $new = clone $this; $new->message = $this->message->withBody($body); return $new; } } StreamDecorator.php 0000644 00000003244 15107420101 0010345 0 ustar 00 <?php namespace Http\Message\Decorator; use Psr\Http\Message\StreamInterface; /** * Decorates a stream. * * @author Márk Sági-Kazár <mark.sagikazar@gmail.com> */ trait StreamDecorator { /** * @var StreamInterface */ protected $stream; public function __toString(): string { return $this->stream->__toString(); } public function close(): void { $this->stream->close(); } public function detach() { return $this->stream->detach(); } public function getSize(): ?int { return $this->stream->getSize(); } public function tell(): int { return $this->stream->tell(); } public function eof(): bool { return $this->stream->eof(); } public function isSeekable(): bool { return $this->stream->isSeekable(); } public function seek(int $offset, int $whence = SEEK_SET): void { $this->stream->seek($offset, $whence); } public function rewind(): void { $this->stream->rewind(); } public function isWritable(): bool { return $this->stream->isWritable(); } public function write(string $string): int { return $this->stream->write($string); } public function isReadable(): bool { return $this->stream->isReadable(); } public function read(int $length): string { return $this->stream->read($length); } public function getContents(): string { return $this->stream->getContents(); } public function getMetadata(string $key = null) { return $this->stream->getMetadata($key); } }