PluginProbe
ActivityPub / 1.0.7
ActivityPub v1.0.7
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 / class-actor.php

class-actor.php in ActivityPub 1.0.7, at includes/activity/class-actor.php

140 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Inspired by the PHP ActivityPub Library by @Landrok
4 *
5 * @link https://github.com/landrok/activitypub
6 */
7
8 namespace Activitypub\Activity;
9
10 /**
11 * \Activitypub\Activity\Actor is an implementation of
12 * one an Activity Streams Actor.
13 *
14 * Represents an individual actor.
15 *
16 * @see https://www.w3.org/TR/activitystreams-vocabulary/#actor-types
17 */
18 class Actor extends Base_Object {
19 /**
20 * @var string
21 */
22 protected $type = 'Person';
23
24 /**
25 * A reference to an ActivityStreams OrderedCollection comprised of
26 * all the messages received by the actor.
27 *
28 * @see https://www.w3.org/TR/activitypub/#inbox
29 *
30 * @var string
31 * | null
32 */
33 protected $inbox;
34
35 /**
36 * A reference to an ActivityStreams OrderedCollection comprised of
37 * all the messages produced by the actor.
38 *
39 * @see https://www.w3.org/TR/activitypub/#outbox
40 *
41 * @var string
42 * | null
43 */
44 protected $outbox;
45
46 /**
47 * A link to an ActivityStreams collection of the actors that this
48 * actor is following.
49 *
50 * @see https://www.w3.org/TR/activitypub/#following
51 *
52 * @var string
53 */
54 protected $following;
55
56 /**
57 * A link to an ActivityStreams collection of the actors that
58 * follow this actor.
59 *
60 * @see https://www.w3.org/TR/activitypub/#followers
61 *
62 * @var string
63 */
64 protected $followers;
65
66 /**
67 * A link to an ActivityStreams collection of objects this actor has
68 * liked.
69 *
70 * @see https://www.w3.org/TR/activitypub/#liked
71 *
72 * @var string
73 */
74 protected $liked;
75
76 /**
77 * A list of supplementary Collections which may be of interest.
78 *
79 * @see https://www.w3.org/TR/activitypub/#streams-property
80 *
81 * @var array
82 */
83 protected $streams = array();
84
85 /**
86 * A short username which may be used to refer to the actor, with no
87 * uniqueness guarantees.
88 *
89 * @see https://www.w3.org/TR/activitypub/#preferredUsername
90 *
91 * @var string|null
92 */
93 protected $preferred_username;
94
95 /**
96 * A JSON object which maps additional typically server/domain-wide
97 * endpoints which may be useful either for this actor or someone
98 * referencing this actor. This mapping may be nested inside the
99 * actor document as the value or may be a link to a JSON-LD
100 * document with these properties.
101 *
102 * @see https://www.w3.org/TR/activitypub/#endpoints
103 *
104 * @var string|array|null
105 */
106 protected $endpoints;
107
108 /**
109 * It's not part of the ActivityPub protocol but it's a quite common
110 * practice to handle an actor public key with a publicKey array:
111 * [
112 * 'id' => 'https://my-example.com/actor#main-key'
113 * 'owner' => 'https://my-example.com/actor',
114 * 'publicKeyPem' => '-----BEGIN PUBLIC KEY-----
115 * MIIBI [...]
116 * DQIDAQAB
117 * -----END PUBLIC KEY-----'
118 * ]
119 *
120 * @see https://www.w3.org/wiki/SocialCG/ActivityPub/Authentication_Authorization#Signing_requests_using_HTTP_Signatures
121 *
122 * @var string|array|null
123 */
124 protected $public_key;
125
126 /**
127 * It's not part of the ActivityPub protocol but it's a quite common
128 * practice to lock an account. If anabled, new followers will not be
129 * automatically accepted, but will instead require you to manually
130 * approve them.
131 *
132 * WordPress does only support 'false' at the moment.
133 *
134 * @see https://docs.joinmastodon.org/spec/activitypub/#as
135 *
136 * @var boolean
137 */
138 protected $manually_approves_followers = false;
139 }
140