Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 21... Línea 21...
21
 * Implements all of the PSR-17 interfaces.
21
 * Implements all of the PSR-17 interfaces.
22
 *
22
 *
23
 * Note: in consuming code it is recommended to require the implemented interfaces
23
 * Note: in consuming code it is recommended to require the implemented interfaces
24
 * and inject the instance of this class multiple times.
24
 * and inject the instance of this class multiple times.
25
 */
25
 */
26
final class HttpFactory implements
-
 
27
    RequestFactoryInterface,
-
 
28
    ResponseFactoryInterface,
-
 
29
    ServerRequestFactoryInterface,
26
final class HttpFactory implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface
30
    StreamFactoryInterface,
-
 
31
    UploadedFileFactoryInterface,
-
 
32
    UriFactoryInterface
-
 
33
{
27
{
34
    public function createUploadedFile(
28
    public function createUploadedFile(
35
        StreamInterface $stream,
29
        StreamInterface $stream,
36
        int $size = null,
30
        ?int $size = null,
37
        int $error = \UPLOAD_ERR_OK,
31
        int $error = \UPLOAD_ERR_OK,
38
        string $clientFilename = null,
32
        ?string $clientFilename = null,
39
        string $clientMediaType = null
33
        ?string $clientMediaType = null
40
    ): UploadedFileInterface {
34
    ): UploadedFileInterface {
41
        if ($size === null) {
35
        if ($size === null) {
42
            $size = $stream->getSize();
36
            $size = $stream->getSize();
43
        }
37
        }