123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <?php
- defined('GNUSOCIAL') || die();
- class Activitypub_activityverb2 extends Managed_DataObject
- {
- const FULL_LIST =
- [
- 'Accept' => 'https://www.w3.org/ns/activitystreams#Accept',
- 'TentativeAccept' => 'https://www.w3.org/ns/activitystreams#TentativeAccept',
- 'Add' => 'https://www.w3.org/ns/activitystreams#Add',
- 'Arrive' => 'https://www.w3.org/ns/activitystreams#Arrive',
- 'Create' => 'https://www.w3.org/ns/activitystreams#Create',
- 'Delete' => 'https://www.w3.org/ns/activitystreams#Delete',
- 'Follow' => 'https://www.w3.org/ns/activitystreams#Follow',
- 'Ignore' => 'https://www.w3.org/ns/activitystreams#Ignore',
- 'Join' => 'https://www.w3.org/ns/activitystreams#Join',
- 'Leave' => 'https://www.w3.org/ns/activitystreams#Leave',
- 'Like' => 'https://www.w3.org/ns/activitystreams#Like',
- 'Offer' => 'https://www.w3.org/ns/activitystreams#Offer',
- 'Invite' => 'https://www.w3.org/ns/activitystreams#Invite',
- 'Reject' => 'https://www.w3.org/ns/activitystreams#Reject',
- 'TentativeReject' => 'https://www.w3.org/ns/activitystreams#TentativeReject',
- 'Remove' => 'https://www.w3.org/ns/activitystreams#Remove',
- 'Undo' => 'https://www.w3.org/ns/activitystreams#Undo',
- 'Update' => 'https://www.w3.org/ns/activitystreams#Update',
- 'View' => 'https://www.w3.org/ns/activitystreams#View',
- 'Listen' => 'https://www.w3.org/ns/activitystreams#Listen',
- 'Read' => 'https://www.w3.org/ns/activitystreams#Read',
- 'Move' => 'https://www.w3.org/ns/activitystreams#Move',
- 'Travel' => 'https://www.w3.org/ns/activitystreams#Travel',
- 'Announce' => 'https://www.w3.org/ns/activitystreams#Announce',
- 'Block' => 'https://www.w3.org/ns/activitystreams#Block',
- 'Flag' => 'https://www.w3.org/ns/activitystreams#Flag',
- 'Dislike' => 'https://www.w3.org/ns/activitystreams#Dislike',
- 'Question' => 'https://www.w3.org/ns/activitystreams#Question'
- ];
- const KNOWN =
- [
- 'Accept',
- 'Create',
- 'Delete',
- 'Follow',
- 'Like',
- 'Undo',
- 'Announce'
- ];
-
- public static function canonical($verb)
- {
- $ns = 'https://www.w3.org/ns/activitystreams#';
- if (substr($verb, 0, mb_strlen($ns)) == $ns) {
- return substr($verb, mb_strlen($ns));
- } else {
- return $verb;
- }
- }
- }
|