Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Public Member Functions | |
createRequest (string $method, $uri) | |
createResponse (int $code=200, string $reasonPhrase='') | |
createServerRequest (string $method, $uri, array $serverParams=[]) | |
createStream (string $content='') | |
createStreamFromFile (string $file, string $mode='r') | |
Create a stream from an existing file. | |
createStreamFromResource ($resource) | |
Create a new stream from an existing resource. | |
createUploadedFile (StreamInterface $stream, int $size=null, int $error=UPLOAD_ERR_OK, string $clientFilename=null, string $clientMediaType=null) | |
createUri (string $uri='') | |
GuzzleHttp\Psr7\HttpFactory::createRequest | ( | string | $method, |
$uri ) |
Implements Psr\Http\Message\RequestFactoryInterface.
GuzzleHttp\Psr7\HttpFactory::createResponse | ( | int | $code = 200, |
string | $reasonPhrase = '' ) |
Implements Psr\Http\Message\ResponseFactoryInterface.
GuzzleHttp\Psr7\HttpFactory::createServerRequest | ( | string | $method, |
$uri, | |||
array | $serverParams = [] ) |
Implements Psr\Http\Message\ServerRequestFactoryInterface.
GuzzleHttp\Psr7\HttpFactory::createStream | ( | string | $content = '' | ) |
Implements Psr\Http\Message\StreamFactoryInterface.
GuzzleHttp\Psr7\HttpFactory::createStreamFromFile | ( | string | $filename, |
string | $mode = 'r' ) |
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()
.
string | $filename | Filename or stream URI to use as basis of stream. |
string | $mode | Mode with which to open the underlying filename/stream. |
StreamInterface |
RuntimeException | If the file cannot be opened. |
InvalidArgumentException | If the mode is invalid. |
Implements Psr\Http\Message\StreamFactoryInterface.
GuzzleHttp\Psr7\HttpFactory::createStreamFromResource | ( | $resource | ) |
Create a new stream from an existing resource.
The stream MUST be readable and may be writable.
resource | $resource | PHP resource to use as basis of stream. |
StreamInterface |
Implements Psr\Http\Message\StreamFactoryInterface.
GuzzleHttp\Psr7\HttpFactory::createUploadedFile | ( | StreamInterface | $stream, |
int | $size = null, | ||
int | $error = UPLOAD_ERR_OK, | ||
string | $clientFilename = null, | ||
string | $clientMediaType = null ) |
Implements Psr\Http\Message\UploadedFileFactoryInterface.
GuzzleHttp\Psr7\HttpFactory::createUri | ( | string | $uri = '' | ) |
Implements Psr\Http\Message\UriFactoryInterface.