Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 26... Línea 26...
26
     *
26
     *
27
     * @return StreamInterface Stream representation of the uploaded file.
27
     * @return StreamInterface Stream representation of the uploaded file.
28
     * @throws \RuntimeException in cases when no stream is available or can be
28
     * @throws \RuntimeException in cases when no stream is available or can be
29
     *     created.
29
     *     created.
30
     */
30
     */
31
    public function getStream();
31
    public function getStream(): StreamInterface;
Línea 32... Línea 32...
32
 
32
 
33
    /**
33
    /**
34
     * Move the uploaded file to a new location.
34
     * Move the uploaded file to a new location.
35
     *
35
     *
Línea 60... Línea 60...
60
     * @param string $targetPath Path to which to move the uploaded file.
60
     * @param string $targetPath Path to which to move the uploaded file.
61
     * @throws \InvalidArgumentException if the $targetPath specified is invalid.
61
     * @throws \InvalidArgumentException if the $targetPath specified is invalid.
62
     * @throws \RuntimeException on any error during the move operation, or on
62
     * @throws \RuntimeException on any error during the move operation, or on
63
     *     the second or subsequent call to the method.
63
     *     the second or subsequent call to the method.
64
     */
64
     */
65
    public function moveTo($targetPath);
65
    public function moveTo(string $targetPath): void;
Línea 66... Línea 66...
66
    
66
    
67
    /**
67
    /**
68
     * Retrieve the file size.
68
     * Retrieve the file size.
69
     *
69
     *
70
     * Implementations SHOULD return the value stored in the "size" key of
70
     * Implementations SHOULD return the value stored in the "size" key of
71
     * the file in the $_FILES array if available, as PHP calculates this based
71
     * the file in the $_FILES array if available, as PHP calculates this based
72
     * on the actual size transmitted.
72
     * on the actual size transmitted.
73
     *
73
     *
74
     * @return int|null The file size in bytes or null if unknown.
74
     * @return int|null The file size in bytes or null if unknown.
75
     */
75
     */
Línea 76... Línea 76...
76
    public function getSize();
76
    public function getSize(): ?int;
77
    
77
    
78
    /**
78
    /**
79
     * Retrieve the error associated with the uploaded file.
79
     * Retrieve the error associated with the uploaded file.
Línea 87... Línea 87...
87
     * the file in the $_FILES array.
87
     * the file in the $_FILES array.
88
     *
88
     *
89
     * @see http://php.net/manual/en/features.file-upload.errors.php
89
     * @see http://php.net/manual/en/features.file-upload.errors.php
90
     * @return int One of PHP's UPLOAD_ERR_XXX constants.
90
     * @return int One of PHP's UPLOAD_ERR_XXX constants.
91
     */
91
     */
92
    public function getError();
92
    public function getError(): int;
Línea 93... Línea 93...
93
    
93
    
94
    /**
94
    /**
95
     * Retrieve the filename sent by the client.
95
     * Retrieve the filename sent by the client.
96
     *
96
     *
Línea 102... Línea 102...
102
     * the file in the $_FILES array.
102
     * the file in the $_FILES array.
103
     *
103
     *
104
     * @return string|null The filename sent by the client or null if none
104
     * @return string|null The filename sent by the client or null if none
105
     *     was provided.
105
     *     was provided.
106
     */
106
     */
107
    public function getClientFilename();
107
    public function getClientFilename(): ?string;
Línea 108... Línea 108...
108
    
108
    
109
    /**
109
    /**
110
     * Retrieve the media type sent by the client.
110
     * Retrieve the media type sent by the client.
111
     *
111
     *
Línea 117... Línea 117...
117
     * the file in the $_FILES array.
117
     * the file in the $_FILES array.
118
     *
118
     *
119
     * @return string|null The media type sent by the client or null if none
119
     * @return string|null The media type sent by the client or null if none
120
     *     was provided.
120
     *     was provided.
121
     */
121
     */
122
    public function getClientMediaType();
122
    public function getClientMediaType(): ?string;
123
}
123
}