1 | <?php |
||
9 | class PatchType implements \JsonSerializable |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $name; |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $description; |
||
19 | |||
20 | /** |
||
21 | * @Important |
||
22 | * @param string $name The name of the patch type. Should not contain special characters or spaces. Note: the default type is an empty string. |
||
23 | * @param string $description The description of the patch type |
||
24 | * @throws PatchException |
||
25 | */ |
||
26 | public function __construct(string $name, string $description) |
||
35 | |||
36 | /** |
||
37 | * The name of the patch type. Should not contain special characters or spaces. |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getName(): string |
||
45 | |||
46 | /** |
||
47 | * The description of the patch type. |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | public function getDescription(): string |
||
55 | |||
56 | /** |
||
57 | * Specify data which should be serialized to JSON |
||
58 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
59 | * @return mixed data which can be serialized by <b>json_encode</b>, |
||
60 | * which is a value of any type other than a resource. |
||
61 | * @since 5.4.0 |
||
62 | */ |
||
63 | public function jsonSerialize() |
||
71 | } |
||
72 |