PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 5.7.0
Defender Security – Malware Scanner, Login Security & Firewall v5.7.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / vendor / league / uri-interfaces / src / Contracts / DataPathInterface.php

DataPathInterface.php in Defender Security – Malware Scanner, Login Security & Firewall 5.7.0, at vendor/league/uri-interfaces/src/Contracts/DataPathInterface.php

93 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * League.Uri (https://uri.thephpleague.com)
5 *
6 * (c) Ignace Nyamagana Butera <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 declare(strict_types=1);
13
14 namespace League\Uri\Contracts;
15
16 interface DataPathInterface extends PathInterface
17 {
18 /**
19 * Retrieve the data mime type associated to the URI.
20 *
21 * If no mimetype is present, this method MUST return the default mimetype 'text/plain'.
22 *
23 * @see http://tools.ietf.org/html/rfc2397#section-2
24 */
25 public function getMimeType(): string;
26
27 /**
28 * Retrieve the parameters associated with the Mime Type of the URI.
29 *
30 * If no parameters is present, this method MUST return the default parameter 'charset=US-ASCII'.
31 *
32 * @see http://tools.ietf.org/html/rfc2397#section-2
33 */
34 public function getParameters(): string;
35
36 /**
37 * Retrieve the mediatype associated with the URI.
38 *
39 * If no mediatype is present, this method MUST return the default parameter 'text/plain;charset=US-ASCII'.
40 *
41 * @see http://tools.ietf.org/html/rfc2397#section-3
42 *
43 * @return string The URI scheme.
44 */
45 public function getMediaType(): string;
46
47 /**
48 * Retrieves the data string.
49 *
50 * Retrieves the data part of the path. If no data part is provided return
51 * a empty string
52 */
53 public function getData(): string;
54
55 /**
56 * Tells whether the data is binary safe encoded.
57 */
58 public function isBinaryData(): bool;
59
60 /**
61 * Save the data to a specific file.
62 */
63 public function save(string $path, string $mode = 'w'): \SplFileObject;
64
65 /**
66 * Returns an instance where the data part is base64 encoded.
67 *
68 * This method MUST retain the state of the current instance, and return
69 * an instance where the data part is base64 encoded
70 */
71 public function toBinary(): self;
72
73 /**
74 * Returns an instance where the data part is url encoded following RFC3986 rules.
75 *
76 * This method MUST retain the state of the current instance, and return
77 * an instance where the data part is url encoded
78 */
79 public function toAscii(): self;
80
81 /**
82 * Return an instance with the specified mediatype parameters.
83 *
84 * This method MUST retain the state of the current instance, and return
85 * an instance that contains the specified mediatype parameters.
86 *
87 * Users must provide encoded characters.
88 *
89 * An empty parameters value is equivalent to removing the parameter.
90 */
91 public function withParameters(string $parameters): self;
92 }
93