Commit realizado el 12:13:52 08-04-2024
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 PHP-FIG
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Vendor\Psr\Http\Message;
|
||||
|
||||
interface RequestFactoryInterface
|
||||
{
|
||||
/**
|
||||
* Create a new request.
|
||||
*
|
||||
* @param string $method The HTTP method associated with the request.
|
||||
* @param UriInterface|string $uri The URI associated with the request. If
|
||||
* the value is a string, the factory MUST create a UriInterface
|
||||
* instance based on it.
|
||||
*
|
||||
* @return RequestInterface
|
||||
*/
|
||||
public function createRequest(string $method, $uri) : \WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface;
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Vendor\Psr\Http\Message;
|
||||
|
||||
interface ResponseFactoryInterface
|
||||
{
|
||||
/**
|
||||
* Create a new response.
|
||||
*
|
||||
* @param int $code HTTP status code; defaults to 200
|
||||
* @param string $reasonPhrase Reason phrase to associate with status code
|
||||
* in generated response; if none is provided implementations MAY use
|
||||
* the defaults as suggested in the HTTP specification.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function createResponse(int $code = 200, string $reasonPhrase = '') : \WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface;
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Vendor\Psr\Http\Message;
|
||||
|
||||
interface ServerRequestFactoryInterface
|
||||
{
|
||||
/**
|
||||
* Create a new server request.
|
||||
*
|
||||
* Note that server-params are taken precisely as given - no parsing/processing
|
||||
* of the given values is performed, and, in particular, no attempt is made to
|
||||
* determine the HTTP method or URI, which must be provided explicitly.
|
||||
*
|
||||
* @param string $method The HTTP method associated with the request.
|
||||
* @param UriInterface|string $uri The URI associated with the request. If
|
||||
* the value is a string, the factory MUST create a UriInterface
|
||||
* instance based on it.
|
||||
* @param array $serverParams Array of SAPI parameters with which to seed
|
||||
* the generated request instance.
|
||||
*
|
||||
* @return ServerRequestInterface
|
||||
*/
|
||||
public function createServerRequest(string $method, $uri, array $serverParams = []) : \WPMailSMTP\Vendor\Psr\Http\Message\ServerRequestInterface;
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Vendor\Psr\Http\Message;
|
||||
|
||||
interface StreamFactoryInterface
|
||||
{
|
||||
/**
|
||||
* Create a new stream from a string.
|
||||
*
|
||||
* The stream SHOULD be created with a temporary resource.
|
||||
*
|
||||
* @param string $content String content with which to populate the stream.
|
||||
*
|
||||
* @return StreamInterface
|
||||
*/
|
||||
public function createStream(string $content = '') : \WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface;
|
||||
/**
|
||||
* Create a stream from an existing file.
|
||||
*
|
||||
* The file MUST be opened using the given mode, which may be any mode
|
||||
* supported by the `fopen` function.
|
||||
*
|
||||
* The `$filename` MAY be any string supported by `fopen()`.
|
||||
*
|
||||
* @param string $filename Filename or stream URI to use as basis of stream.
|
||||
* @param string $mode Mode with which to open the underlying filename/stream.
|
||||
*
|
||||
* @return StreamInterface
|
||||
* @throws \RuntimeException If the file cannot be opened.
|
||||
* @throws \InvalidArgumentException If the mode is invalid.
|
||||
*/
|
||||
public function createStreamFromFile(string $filename, string $mode = 'r') : \WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface;
|
||||
/**
|
||||
* Create a new stream from an existing resource.
|
||||
*
|
||||
* The stream MUST be readable and may be writable.
|
||||
*
|
||||
* @param resource $resource PHP resource to use as basis of stream.
|
||||
*
|
||||
* @return StreamInterface
|
||||
*/
|
||||
public function createStreamFromResource($resource) : \WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface;
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Vendor\Psr\Http\Message;
|
||||
|
||||
interface UploadedFileFactoryInterface
|
||||
{
|
||||
/**
|
||||
* Create a new uploaded file.
|
||||
*
|
||||
* If a size is not provided it will be determined by checking the size of
|
||||
* the file.
|
||||
*
|
||||
* @see http://php.net/manual/features.file-upload.post-method.php
|
||||
* @see http://php.net/manual/features.file-upload.errors.php
|
||||
*
|
||||
* @param StreamInterface $stream Underlying stream representing the
|
||||
* uploaded file content.
|
||||
* @param int $size in bytes
|
||||
* @param int $error PHP file upload error
|
||||
* @param string $clientFilename Filename as provided by the client, if any.
|
||||
* @param string $clientMediaType Media type as provided by the client, if any.
|
||||
*
|
||||
* @return UploadedFileInterface
|
||||
*
|
||||
* @throws \InvalidArgumentException If the file resource is not readable.
|
||||
*/
|
||||
public function createUploadedFile(\WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface $stream, int $size = null, int $error = \UPLOAD_ERR_OK, string $clientFilename = null, string $clientMediaType = null) : \WPMailSMTP\Vendor\Psr\Http\Message\UploadedFileInterface;
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Vendor\Psr\Http\Message;
|
||||
|
||||
interface UriFactoryInterface
|
||||
{
|
||||
/**
|
||||
* Create a new URI.
|
||||
*
|
||||
* @param string $uri
|
||||
*
|
||||
* @return UriInterface
|
||||
*
|
||||
* @throws \InvalidArgumentException If the given URI cannot be parsed.
|
||||
*/
|
||||
public function createUri(string $uri = '') : \WPMailSMTP\Vendor\Psr\Http\Message\UriInterface;
|
||||
}
|
Reference in New Issue
Block a user