PluginProbe
ActivityPub / 2.5.0
ActivityPub v2.5.0
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
activitypub / includes / activity / extended-object / class-place.php

class-place.php in ActivityPub 2.5.0, at includes/activity/extended-object/class-place.php

94 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Event is an implementation of one of the
4 * Activity Streams Event object type
5 *
6 * @package activity-event-transformers
7 */
8
9 namespace Activitypub\Activity\Extended_Object;
10
11 use Activitypub\Activity\Base_Object;
12
13 /**
14 * Event is an implementation of one of the
15 * Activity Streams Event object type
16 *
17 * The Object is the primary base type for the Activity Streams
18 * vocabulary.
19 *
20 * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event
21 */
22 class Place extends Base_Object {
23 /**
24 * Place is an implementation of one of the
25 * Activity Streams
26 *
27 * @var string
28 */
29 protected $type = 'Place';
30
31 /**
32 * Indicates the accuracy of position coordinates on a Place objects.
33 * Expressed in properties of percentage. e.g. "94.0" means "94.0% accurate".
34 *
35 * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accuracy
36 * @var float xsd:float [>= 0.0f, <= 100.0f]
37 */
38 protected $accuracy;
39
40 /**
41 * Indicates the altitude of a place. The measurement units is indicated using the units property.
42 * If units is not specified, the default is assumed to be "m" indicating meters.
43 *
44 * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-altitude
45 * @var float xsd:float
46 */
47 protected $altitude;
48
49 /**
50 * The latitude of a place.
51 *
52 * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-latitude
53 * @var float xsd:float
54 */
55 protected $latitude;
56
57 /**
58 * The longitude of a place.
59 *
60 * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-longitude
61 * @var float xsd:float
62 */
63 protected $longitude;
64
65 /**
66 * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-radius
67 * @var float
68 */
69 protected $radius;
70
71 /**
72 * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-units
73 * @var string
74 */
75 protected $units;
76
77 /**
78 * @var Postal_Address|string
79 */
80 protected $address;
81
82 public function set_address( $address ) {
83 if ( is_string( $address ) || is_array( $address ) ) {
84 $this->address = $address;
85 } else {
86 _doing_it_wrong(
87 __METHOD__,
88 'The address must be either a string or an array like schema.org/PostalAddress.',
89 '<version_placeholder>'
90 );
91 }
92 }
93 }
94