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 | * Extensions associated with the {@link Activity}. |
||
64 | * |
||
65 | * @var Extensions|null |
||
66 | */ |
||
67 | private $extensions; |
||
68 | |||
69 | /** |
||
70 | * @param LanguageMap|null $name |
||
71 | * @param LanguageMap|null $description |
||
72 | * @param string|null $type |
||
73 | * @param string|null $moreInfo |
||
74 | * @param Extensions|null $extensions |
||
75 | */ |
||
76 | public function __construct(LanguageMap $name = null, LanguageMap $description = null, $type = null, $moreInfo = null, Extensions $extensions = null) |
||
84 | |||
85 | public function withName(LanguageMap $name = null) |
||
92 | |||
93 | public function withDescription(LanguageMap $description = null) |
||
100 | |||
101 | /** |
||
102 | * @param string|null $type |
||
103 | * |
||
104 | * @return static |
||
105 | */ |
||
106 | public function withType($type) |
||
113 | |||
114 | /** |
||
115 | * @param string|null $moreInfo |
||
116 | * |
||
117 | * @return static |
||
118 | */ |
||
119 | public function withMoreInfo($moreInfo) |
||
126 | |||
127 | public function withExtensions(Extensions $extensions) |
||
134 | |||
135 | /** |
||
136 | * Returns the human readable names. |
||
137 | * |
||
138 | * @return LanguageMap|null The name language map |
||
139 | */ |
||
140 | public function getName() |
||
144 | |||
145 | /** |
||
146 | * Returns the human readable descriptions. |
||
147 | * |
||
148 | * @return LanguageMap|null The description language map |
||
149 | */ |
||
150 | public function getDescription() |
||
154 | |||
155 | /** |
||
156 | * Returns the {@link Activity} type. |
||
157 | * |
||
158 | * @return string|null The type |
||
159 | */ |
||
160 | public function getType() |
||
164 | |||
165 | /** |
||
166 | * Returns an IRL where human-readable information about the activity can be found. |
||
167 | * |
||
168 | * @return string|null |
||
169 | */ |
||
170 | public function getMoreInfo() |
||
174 | |||
175 | public function getExtensions() |
||
179 | |||
180 | /** |
||
181 | * Checks if another definition is equal. |
||
182 | * |
||
183 | * Two definitions are equal if and only if all of their properties are equal. |
||
184 | * |
||
185 | * @param Definition $definition The definition to compare with |
||
186 | * |
||
187 | * @return bool True if the definitions are equal, false otherwise |
||
188 | */ |
||
189 | public function equals(Definition $definition) |
||
253 | } |
||
254 |