1 | <?php |
||
48 | class JsonLd extends BaseObject |
||
49 | { |
||
50 | /** |
||
51 | * Register new Article. |
||
52 | * |
||
53 | * An article, such as a news article or piece of investigative report. |
||
54 | * Newspapers and magazines have articles of many different types and this is intended to cover them all. |
||
55 | * |
||
56 | * @param array $config Optional config array to provided article data via setter methods. |
||
57 | * @return \luya\web\jsonld\Article |
||
58 | * @since 1.0.1 |
||
59 | */ |
||
60 | public static function article(array $config = []) |
||
64 | |||
65 | /** |
||
66 | * Register new Blog Posting. |
||
67 | * |
||
68 | * @param array $config Optional config array to provided blog posting data via setter methods. |
||
69 | * @return \luya\web\jsonld\BlogPosting |
||
70 | * @since 1.0.1 |
||
71 | */ |
||
72 | public static function blogPosting(array $config = []) |
||
76 | |||
77 | /** |
||
78 | * Register new Thing. |
||
79 | * |
||
80 | * @param array $config Optional config array to provided person data via setter methods. |
||
81 | * @return \luya\web\jsonld\Thing |
||
82 | */ |
||
83 | public static function thing(array $config = []) |
||
87 | |||
88 | /** |
||
89 | * Register new CreativeWork. |
||
90 | * |
||
91 | * The most generic kind of creative work, including books, movies, photographs, software programs, etc. |
||
92 | * |
||
93 | * @param array $config Optional config array to provided creative work data via setter methods. |
||
94 | * @return \luya\web\jsonld\CreativeWork |
||
95 | * @since 1.0.1 |
||
96 | */ |
||
97 | public static function creativeWork(array $config = []) |
||
101 | |||
102 | /** |
||
103 | * Register new Event. |
||
104 | * |
||
105 | * An event happening at a certain time and location, such as a concert, lecture, or festival. |
||
106 | * |
||
107 | * @param array $config |
||
108 | * @return \luya\web\jsonld\Event |
||
109 | */ |
||
110 | public static function event(array $config = []) |
||
114 | |||
115 | /** |
||
116 | * Register new Live Blog Posting. |
||
117 | * |
||
118 | * A blog post intended to provide a rolling textual coverage of an ongoing event through continuous updates. |
||
119 | * |
||
120 | * @param array $config Optional config array to provided live blog posting data via setter methods. |
||
121 | * @return \luya\web\jsonld\LiveBlogPosting |
||
122 | * @since 1.0.1 |
||
123 | */ |
||
124 | public static function liveBlogPosting(array $config = []) |
||
128 | |||
129 | /** |
||
130 | * Register new Organization. |
||
131 | * |
||
132 | * An organization such as a school, NGO, corporation, club, etc. |
||
133 | * |
||
134 | * @param array $config Optional config array to provided organization data via setter methods. |
||
135 | * @return \luya\web\jsonld\Organization |
||
136 | */ |
||
137 | public static function organization(array $config = []) |
||
141 | |||
142 | /** |
||
143 | * Register new Person. |
||
144 | * |
||
145 | * A person (alive, dead, undead, or fictional). |
||
146 | * |
||
147 | * @param array $config Optional config array to provided person data via setter methods. |
||
148 | * @return \luya\web\jsonld\Person |
||
149 | */ |
||
150 | public static function person(array $config = []) |
||
154 | |||
155 | /** |
||
156 | * Register new Place |
||
157 | * |
||
158 | * Entities that have a somewhat fixed, physical extension. |
||
159 | * |
||
160 | * @param array $config Optional config array to provided place data via setter methods. |
||
161 | * @return \luya\web\jsonld\Place |
||
162 | */ |
||
163 | public static function place(array $config = []) |
||
167 | |||
168 | /** |
||
169 | * Register new Social Media Posting. |
||
170 | * |
||
171 | * A post to a social media platform, including blog posts, tweets, Facebook posts, etc. |
||
172 | * |
||
173 | * @param array $config Optional config array to provided social media posting data via setter methods. |
||
174 | * @return \luya\web\jsonld\SocialMediaPosting |
||
175 | * @since 1.0.1 |
||
176 | */ |
||
177 | public static function socialMediaPosting(array $config = []) |
||
181 | |||
182 | /** |
||
183 | * Register new Image Object. |
||
184 | * |
||
185 | * @param array $config |
||
186 | * @return \luya\web\jsonld\ImageObject |
||
187 | * @since 1.0.3 |
||
188 | */ |
||
189 | public static function imageObject(array $config = []) |
||
193 | |||
194 | /** |
||
195 | * Register new Aggregated Rating. |
||
196 | * |
||
197 | * @param array $config |
||
198 | * @return \luya\web\jsonld\AggregateRating |
||
199 | * @since 1.0.3 |
||
200 | */ |
||
201 | public static function aggregateRating(array $config = []) |
||
205 | |||
206 | /** |
||
207 | * Register new Rating. |
||
208 | * |
||
209 | * @param array $config |
||
210 | * @return \luya\web\jsonld\Rating |
||
211 | * @since 1.0.3 |
||
212 | */ |
||
213 | public static function rating(array $config = []) |
||
217 | |||
218 | /** |
||
219 | * Register new Comment. |
||
220 | * |
||
221 | * @param array $config |
||
222 | * @return \luya\web\jsonld\Comment |
||
223 | * @since 1.0.3 |
||
224 | */ |
||
225 | public static function comment(array $config = []) |
||
229 | |||
230 | /** |
||
231 | * Register new Contact Point. |
||
232 | * |
||
233 | * This is mainly used for addresses or user coordinates like email, telephone etc. |
||
234 | * |
||
235 | * @param array $config |
||
236 | * @return \luya\web\jsonld\ContactPoint |
||
237 | * @since 1.0.3 |
||
238 | */ |
||
239 | public static function contactPoint(array $config = []) |
||
243 | |||
244 | /** |
||
245 | * Register new Country. |
||
246 | * |
||
247 | * @param array $config |
||
248 | * @return \luya\web\jsonld\Country |
||
249 | * @since 1.0.3 |
||
250 | */ |
||
251 | public static function country(array $config = []) |
||
255 | |||
256 | /** |
||
257 | * Register new Offer. |
||
258 | * |
||
259 | * This is used for selling products. |
||
260 | * |
||
261 | * @param array $config |
||
262 | * @return \luya\web\jsonld\Offer |
||
263 | * @since 1.0.3 |
||
264 | */ |
||
265 | public static function offer(array $config = []) |
||
269 | |||
270 | /** |
||
271 | * Register new Postal Address. |
||
272 | * |
||
273 | * @param array $config |
||
274 | * @return \luya\web\jsonld\PostalAddress |
||
275 | * @since 1.0.3 |
||
276 | */ |
||
277 | public static function postalAddress(array $config = []) |
||
281 | |||
282 | /** |
||
283 | * Register new Property Value. |
||
284 | * |
||
285 | * @param array $config |
||
286 | * @return \luya\web\jsonld\PropertyValue |
||
287 | * @since 1.0.3 |
||
288 | */ |
||
289 | public static function propertyValue(array $config = []) |
||
293 | |||
294 | /** |
||
295 | * Register a new service |
||
296 | * |
||
297 | * @param array $config |
||
298 | * @return \luya\web\jsonld\Service |
||
299 | * @since 1.0.19 |
||
300 | */ |
||
301 | public static function service(array $config = []) |
||
305 | |||
306 | /** |
||
307 | * Register graph data. |
||
308 | * |
||
309 | * @param \luya\web\jsonld\BaseThing|array $data Can be either an array or an object based on {{luya\web\jsonld\BaseThing}} which contains the Arrayable Inteface. |
||
310 | * @return array|object |
||
311 | */ |
||
312 | public static function addGraph($data) |
||
325 | |||
326 | /** |
||
327 | * Reset the JsonLd Data. |
||
328 | * |
||
329 | * This method is mainly usefull when working with unit tests for JsonLd. |
||
330 | */ |
||
331 | public static function reset() |
||
336 | |||
337 | private static $_view; |
||
338 | |||
339 | /** |
||
340 | * Register the view file an observe the event which then reads the data from @graph params key. |
||
341 | */ |
||
342 | protected static function registerView() |
||
352 | } |
||
353 |