1 | <?php |
||
35 | class Definition |
||
36 | { |
||
37 | /** |
||
38 | * The human readable activity name |
||
39 | * @var LanguageMap|null |
||
40 | */ |
||
41 | private $name; |
||
42 | |||
43 | /** |
||
44 | * The human readable activity description |
||
45 | * @var LanguageMap|null |
||
46 | */ |
||
47 | private $description; |
||
48 | |||
49 | /** |
||
50 | * The type of the {@link Activity} |
||
51 | * @var string|null |
||
52 | */ |
||
53 | private $type; |
||
54 | |||
55 | /** |
||
56 | * An IRL where human-readable information describing the {@link Activity} can be found. |
||
57 | * |
||
58 | * @var string|null |
||
59 | */ |
||
60 | private $moreInfo; |
||
61 | |||
62 | /** |
||
63 | * @param LanguageMap|null $name |
||
64 | * @param LanguageMap|null $description |
||
65 | * @param string|null $type |
||
66 | * @param string|null $moreInfo |
||
67 | */ |
||
68 | public function __construct(LanguageMap $name = null, LanguageMap $description = null, $type = null, $moreInfo = null) |
||
75 | |||
76 | public function withName(LanguageMap $name = null) |
||
83 | |||
84 | public function withDescription(LanguageMap $description = null) |
||
91 | |||
92 | /** |
||
93 | * @param string|null $type |
||
94 | * |
||
95 | * @return static |
||
96 | */ |
||
97 | public function withType($type) |
||
104 | |||
105 | /** |
||
106 | * @param string|null $moreInfo |
||
107 | * |
||
108 | * @return static |
||
109 | */ |
||
110 | public function withMoreInfo($moreInfo) |
||
117 | |||
118 | /** |
||
119 | * Returns the human readable names. |
||
120 | * |
||
121 | * @return LanguageMap|null The name language map |
||
122 | */ |
||
123 | public function getName() |
||
127 | |||
128 | /** |
||
129 | * Returns the human readable descriptions. |
||
130 | * |
||
131 | * @return LanguageMap|null The description language map |
||
132 | */ |
||
133 | public function getDescription() |
||
137 | |||
138 | /** |
||
139 | * Returns the {@link Activity} type. |
||
140 | * |
||
141 | * @return string|null The type |
||
142 | */ |
||
143 | public function getType() |
||
147 | |||
148 | /** |
||
149 | * Returns an IRL where human-readable information about the activity can be found. |
||
150 | * |
||
151 | * @return string|null |
||
152 | */ |
||
153 | public function getMoreInfo() |
||
157 | |||
158 | /** |
||
159 | * Checks if another definition is equal. |
||
160 | * |
||
161 | * Two definitions are equal if and only if all of their properties are equal. |
||
162 | * |
||
163 | * @param Definition $definition The definition to compare with |
||
164 | * |
||
165 | * @return bool True if the definitions are equal, false otherwise |
||
166 | */ |
||
167 | public function equals(Definition $definition) |
||
223 | } |
||
224 |