forked from cloudinary/cloudinary_php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfigurableInterface.php
More file actions
81 lines (72 loc) · 2.05 KB
/
Copy pathConfigurableInterface.php
File metadata and controls
81 lines (72 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/**
* This file is part of the Cloudinary PHP package.
*
* (c) Cloudinary
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cloudinary\Configuration;
use JsonSerializable;
/**
* Interface ConfigurableInterface
*/
interface ConfigurableInterface extends JsonSerializable
{
/**
* Creates a new instance using json string or an array as a source.
*
* @param string|array $json Configuration json
*
* @return static
*/
public static function fromJson($json);
/**
* Creates a new instance using Cloudinary url as a source.
*
* @param string $cloudinaryUrl The Cloudinary url.
*
* @return static
*/
public static function fromCloudinaryUrl($cloudinaryUrl);
/**
* Imports configuration from a json string or an array as a source.
*
* @param string|array $json Configuration json
*
* @return static
*/
public function importJson($json);
/**
* Imports configuration from a Cloudinary url as a source.
*
* @param string $cloudinaryUrl The Cloudinary url.
*
* @return static
*/
public function importCloudinaryUrl($cloudinaryUrl);
/**
* Serialises to a string representation.
*
* @return string
*/
public function toString();
/**
* Serialises to a string representation.
*
* @return string
*/
public function __toString();
/**
* Serialises to a json array.
*
* @param bool $includeSensitive Whether to include sensitive keys during serialisation.
* @param bool $includeEmptyKeys Whether to include keys without values.
* @param bool $includeEmptySections Whether to include sections without keys with non-empty values.
*
* @return mixed data which can be serialized by json_encode.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize($includeSensitive = true, $includeEmptyKeys = false, $includeEmptySections = false);
}