PluginProbe
ActivityPub / 4.4.0
ActivityPub v4.4.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 4.4.0, at includes/activity/extended-object/class-place.php

106 lines 2.5 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 * The radius from the given latitude and longitude for a Place.
67 *
68 * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-radius
69 * @var float
70 */
71 protected $radius;
72
73 /**
74 * Specifies the measurement units for the `radius` and `altitude` properties.
75 *
76 * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-units
77 * @var string
78 */
79 protected $units;
80
81 /**
82 * The address of the place.
83 *
84 * @see https://schema.org/PostalAddress
85 * @var array|string
86 */
87 protected $address;
88
89 /**
90 * Set the address of the place.
91 *
92 * @param array|string $address The address of the place.
93 */
94 public function set_address( $address ) {
95 if ( is_string( $address ) || is_array( $address ) ) {
96 $this->address = $address;
97 } else {
98 _doing_it_wrong(
99 __METHOD__,
100 'The address must be either a string or an array like schema.org/PostalAddress.',
101 '<version_placeholder>'
102 );
103 }
104 }
105 }
106