Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
|
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.