PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 1.18
Independent Analytics – WordPress Analytics Plugin v1.18
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
119 lines
1 <?php
2
3 namespace IAWP\Psr\Http\Message;
4
5 /**
6 * Value object representing a file uploaded through an HTTP request.
7 *
8 * Instances of this interface are considered immutable; all methods that
9 * might change state MUST be implemented such that they retain the internal
10 * state of the current instance and return an instance that contains the
11 * changed state.
12 */
13 interface UploadedFileInterface
14 {
15 /**
16 * Retrieve a stream representing the uploaded file.
17 *
18 * This method MUST return a StreamInterface instance, representing the
19 * uploaded file. The purpose of this method is to allow utilizing native PHP
20 * stream functionality to manipulate the file upload, such as
21 * stream_copy_to_stream() (though the result will need to be decorated in a
22 * native PHP stream wrapper to work with such functions).
23 *
24 * If the moveTo() method has been called previously, this method MUST raise
25 * an exception.
26 *
27 * @return StreamInterface Stream representation of the uploaded file.
28 * @throws \RuntimeException in cases when no stream is available or can be
29 * created.
30 */
31 public function getStream();
32 /**
33 * Move the uploaded file to a new location.
34 *
35 * Use this method as an alternative to move_uploaded_file(). This method is
36 * guaranteed to work in both SAPI and non-SAPI environments.
37 * Implementations must determine which environment they are in, and use the
38 * appropriate method (move_uploaded_file(), rename(), or a stream
39 * operation) to perform the operation.
40 *
41 * $targetPath may be an absolute path, or a relative path. If it is a
42 * relative path, resolution should be the same as used by PHP's rename()
43 * function.
44 *
45 * The original file or stream MUST be removed on completion.
46 *
47 * If this method is called more than once, any subsequent calls MUST raise
48 * an exception.
49 *
50 * When used in an SAPI environment where $_FILES is populated, when writing
51 * files via moveTo(), is_uploaded_file() and move_uploaded_file() SHOULD be
52 * used to ensure permissions and upload status are verified correctly.
53 *
54 * If you wish to move to a stream, use getStream(), as SAPI operations
55 * cannot guarantee writing to stream destinations.
56 *
57 * @see http://php.net/is_uploaded_file
58 * @see http://php.net/move_uploaded_file
59 * @param string $targetPath Path to which to move the uploaded file.
60 * @throws \InvalidArgumentException if the $targetPath specified is invalid.
61 * @throws \RuntimeException on any error during the move operation, or on
62 * the second or subsequent call to the method.
63 */
64 public function moveTo($targetPath);
65 /**
66 * Retrieve the file size.
67 *
68 * Implementations SHOULD return the value stored in the "size" key of
69 * the file in the $_FILES array if available, as PHP calculates this based
70 * on the actual size transmitted.
71 *
72 * @return int|null The file size in bytes or null if unknown.
73 */
74 public function getSize();
75 /**
76 * Retrieve the error associated with the uploaded file.
77 *
78 * The return value MUST be one of PHP's UPLOAD_ERR_XXX constants.
79 *
80 * If the file was uploaded successfully, this method MUST return
81 * UPLOAD_ERR_OK.
82 *
83 * Implementations SHOULD return the value stored in the "error" key of
84 * the file in the $_FILES array.
85 *
86 * @see http://php.net/manual/en/features.file-upload.errors.php
87 * @return int One of PHP's UPLOAD_ERR_XXX constants.
88 */
89 public function getError();
90 /**
91 * Retrieve the filename sent by the client.
92 *
93 * Do not trust the value returned by this method. A client could send
94 * a malicious filename with the intention to corrupt or hack your
95 * application.
96 *
97 * Implementations SHOULD return the value stored in the "name" key of
98 * the file in the $_FILES array.
99 *
100 * @return string|null The filename sent by the client or null if none
101 * was provided.
102 */
103 public function getClientFilename();
104 /**
105 * Retrieve the media type sent by the client.
106 *
107 * Do not trust the value returned by this method. A client could send
108 * a malicious media type with the intention to corrupt or hack your
109 * application.
110 *
111 * Implementations SHOULD return the value stored in the "type" key of
112 * the file in the $_FILES array.
113 *
114 * @return string|null The media type sent by the client or null if none
115 * was provided.
116 */
117 public function getClientMediaType();
118 }
119