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