PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 1.28.0
Independent Analytics – WordPress Analytics Plugin v1.28.0
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 1.19.1 1.2 1.20.0 1.21.0 1.22.0 1.22.1 1.23.0 1.23.1 1.24.0 1.24.1 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.28.1 1.28.2 1.28.3 1.29.0 1.3 1.30.0 1.30.1 1.4 1.5 1.6 1.7 1.8 1.9 2.0.0 2.0.1 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.10 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12.0 2.12.1 2.12.2 2.13.1 2.13.2 2.13.5 2.13.6 2.14.0 2.14.1 2.14.2 2.14.4 2.14.6 2.14.7 2.14.8 2.14.9 2.2.0 2.2.1 2.3.1 2.3.2 2.4.2 2.4.3 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.7.1 2.7.2 2.7.3 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7
independent-analytics / vendor / psr / http-message / src / UploadedFileInterface.php
independent-analytics / vendor / psr / http-message / src Last commit date
MessageInterface.php 3 years ago RequestInterface.php 3 years ago ResponseInterface.php 3 years ago ServerRequestInterface.php 3 years ago StreamInterface.php 3 years ago UploadedFileInterface.php 3 years ago UriInterface.php 3 years ago
UploadedFileInterface.php
120 lines
1 <?php
2
3 declare (strict_types=1);
4 namespace IAWP_SCOPED\Psr\Http\Message;
5
6 /**
7 * Value object representing a file uploaded through an HTTP request.
8 *
9 * Instances of this interface are considered immutable; all methods that
10 * might change state MUST be implemented such that they retain the internal
11 * state of the current instance and return an instance that contains the
12 * changed state.
13 */
14 interface UploadedFileInterface
15 {
16 /**
17 * Retrieve a stream representing the uploaded file.
18 *
19 * This method MUST return a StreamInterface instance, representing the
20 * uploaded file. The purpose of this method is to allow utilizing native PHP
21 * stream functionality to manipulate the file upload, such as
22 * stream_copy_to_stream() (though the result will need to be decorated in a
23 * native PHP stream wrapper to work with such functions).
24 *
25 * If the moveTo() method has been called previously, this method MUST raise
26 * an exception.
27 *
28 * @return StreamInterface Stream representation of the uploaded file.
29 * @throws \RuntimeException in cases when no stream is available or can be
30 * created.
31 */
32 public function getStream();
33 /**
34 * Move the uploaded file to a new location.
35 *
36 * Use this method as an alternative to move_uploaded_file(). This method is
37 * guaranteed to work in both SAPI and non-SAPI environments.
38 * Implementations must determine which environment they are in, and use the
39 * appropriate method (move_uploaded_file(), rename(), or a stream
40 * operation) to perform the operation.
41 *
42 * $targetPath may be an absolute path, or a relative path. If it is a
43 * relative path, resolution should be the same as used by PHP's rename()
44 * function.
45 *
46 * The original file or stream MUST be removed on completion.
47 *
48 * If this method is called more than once, any subsequent calls MUST raise
49 * an exception.
50 *
51 * When used in an SAPI environment where $_FILES is populated, when writing
52 * files via moveTo(), is_uploaded_file() and move_uploaded_file() SHOULD be
53 * used to ensure permissions and upload status are verified correctly.
54 *
55 * If you wish to move to a stream, use getStream(), as SAPI operations
56 * cannot guarantee writing to stream destinations.
57 *
58 * @see http://php.net/is_uploaded_file
59 * @see http://php.net/move_uploaded_file
60 * @param string $targetPath Path to which to move the uploaded file.
61 * @throws \InvalidArgumentException if the $targetPath specified is invalid.
62 * @throws \RuntimeException on any error during the move operation, or on
63 * the second or subsequent call to the method.
64 */
65 public function moveTo(string $targetPath);
66 /**
67 * Retrieve the file size.
68 *
69 * Implementations SHOULD return the value stored in the "size" key of
70 * the file in the $_FILES array if available, as PHP calculates this based
71 * on the actual size transmitted.
72 *
73 * @return int|null The file size in bytes or null if unknown.
74 */
75 public function getSize();
76 /**
77 * Retrieve the error associated with the uploaded file.
78 *
79 * The return value MUST be one of PHP's UPLOAD_ERR_XXX constants.
80 *
81 * If the file was uploaded successfully, this method MUST return
82 * UPLOAD_ERR_OK.
83 *
84 * Implementations SHOULD return the value stored in the "error" key of
85 * the file in the $_FILES array.
86 *
87 * @see http://php.net/manual/en/features.file-upload.errors.php
88 * @return int One of PHP's UPLOAD_ERR_XXX constants.
89 */
90 public function getError();
91 /**
92 * Retrieve the filename sent by the client.
93 *
94 * Do not trust the value returned by this method. A client could send
95 * a malicious filename with the intention to corrupt or hack your
96 * application.
97 *
98 * Implementations SHOULD return the value stored in the "name" key of
99 * the file in the $_FILES array.
100 *
101 * @return string|null The filename sent by the client or null if none
102 * was provided.
103 */
104 public function getClientFilename();
105 /**
106 * Retrieve the media type sent by the client.
107 *
108 * Do not trust the value returned by this method. A client could send
109 * a malicious media type with the intention to corrupt or hack your
110 * application.
111 *
112 * Implementations SHOULD return the value stored in the "type" key of
113 * the file in the $_FILES array.
114 *
115 * @return string|null The media type sent by the client or null if none
116 * was provided.
117 */
118 public function getClientMediaType();
119 }
120