updated plugin ActivityPub version 8.3.0
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
# Extended Objects
|
||||
|
||||
This folder contains more complex ActivityPub objects.
|
||||
|
||||
Although they could be created using the `Base_Object`, they provide an easier structure for creating objects with maximum compatibility.
|
||||
@ -10,11 +10,47 @@ namespace Activitypub\Activity\Extended_Object;
|
||||
use Activitypub\Activity\Base_Object;
|
||||
|
||||
/**
|
||||
* Event is an implementation of one of the Activity Streams Event object type.
|
||||
* Event is an implementation of Activity Streams Event object type.
|
||||
*
|
||||
* This class contains extra keys as used by Mobilizon to ensure compatibility.
|
||||
*
|
||||
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event
|
||||
*
|
||||
* @method string|null get_actor() Gets which actor created the event.
|
||||
* @method float|null get_altitude() Gets the altitude of the event location.
|
||||
* @method bool|null get_anonymous_participation_enabled() Gets whether anonymous participation is enabled.
|
||||
* @method string|null get_category() Gets the event's category.
|
||||
* @method bool|null get_comments_enabled() Gets whether comments/replies are enabled.
|
||||
* @method array|null get_contacts() Gets the event's contacts.
|
||||
* @method string|null get_external_participation_url() Gets the external participation URL.
|
||||
* @method string|null get_in_language() Gets the language of the event.
|
||||
* @method bool|null get_is_online() Gets whether the event is online.
|
||||
* @method string|null get_join_mode() Gets how new members may be able to join.
|
||||
* @method int|null get_maximum_attendee_capacity() Gets how many places there can be for an event.
|
||||
* @method string|null get_name() Gets the title of the event.
|
||||
* @method int|null get_participant_count() Gets the participant count of the event.
|
||||
* @method int|null get_remaining_attendee_capacity() Gets the number of attendee places that remain unallocated.
|
||||
* @method string|null get_replies_moderation_option() Gets the moderation option for replies.
|
||||
* @method string|null get_status() Gets the event's status.
|
||||
* @method string|null get_timezone() Gets the timezone of the event.
|
||||
*
|
||||
* @method Event set_actor( string $actor ) Sets which actor created the event.
|
||||
* @method Event set_altitude( float $altitude ) Sets the altitude of the event location.
|
||||
* @method Event set_anonymous_participation_enabled( bool $enabled ) Sets whether anonymous participation is enabled.
|
||||
* @method Event set_category( string $category, bool $mobilizon_compatibility ) Sets the event's category.
|
||||
* @method Event set_comments_enabled( bool $comments_enabled ) Sets whether comments/replies are enabled.
|
||||
* @method Event set_contacts( array $contacts ) Sets the event's contacts.
|
||||
* @method Event set_external_participation_url( string $url ) Sets the external participation URL.
|
||||
* @method Event set_in_language( string $language ) Sets the language of the event.
|
||||
* @method Event set_is_online( bool $is_online ) Sets whether the event is online.
|
||||
* @method Event set_join_mode( string $join_mode ) Sets how new members may be able to join.
|
||||
* @method Event set_maximum_attendee_capacity( int $capacity ) Sets how many places there can be for an event.
|
||||
* @method Event set_name( string $name ) Sets the title of the event.
|
||||
* @method Event set_participant_count( int $count ) Sets the participant count of the event.
|
||||
* @method Event set_remaining_attendee_capacity( int $capacity ) Sets the number of attendee places that remain unallocated.
|
||||
* @method Event set_replies_moderation_option( string $type ) Sets the moderation option for replies.
|
||||
* @method Event set_status( string $status ) Sets the event's status.
|
||||
* @method Event set_timezone( string $timezone ) Sets the timezone of the event.
|
||||
*/
|
||||
class Event extends Base_Object {
|
||||
// Human friendly minimal context for full Mobilizon compatible ActivityPub events.
|
||||
@ -123,7 +159,7 @@ class Event extends Base_Object {
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* The events contacts.
|
||||
* The event's contacts.
|
||||
*
|
||||
* @context {
|
||||
* '@id' => 'mz:contacts',
|
||||
|
||||
@ -11,13 +11,27 @@ namespace Activitypub\Activity\Extended_Object;
|
||||
use Activitypub\Activity\Base_Object;
|
||||
|
||||
/**
|
||||
* Event is an implementation of one of the
|
||||
* Activity Streams Event object type
|
||||
* Place is an implementation of the Activity Streams Place object type.
|
||||
*
|
||||
* The Object is the primary base type for the Activity Streams
|
||||
* vocabulary.
|
||||
* The Place object represents a logical or physical location.
|
||||
*
|
||||
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event
|
||||
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-place
|
||||
*
|
||||
* @method float|null get_accuracy() Gets the accuracy of position coordinates.
|
||||
* @method array|string|null get_address() Gets the address of the place.
|
||||
* @method float|null get_altitude() Gets the altitude of the place.
|
||||
* @method float|null get_latitude() Gets the latitude of the place.
|
||||
* @method float|null get_longitude() Gets the longitude of the place.
|
||||
* @method float|null get_radius() Gets the radius from the given latitude and longitude.
|
||||
* @method string|null get_units() Gets the measurement units for radius and altitude.
|
||||
*
|
||||
* @method Place set_accuracy( float $accuracy ) Sets the accuracy of position coordinates.
|
||||
* @method Place set_address( array|string $address ) Sets the address of the place.
|
||||
* @method Place set_altitude( float $altitude ) Sets the altitude of the place.
|
||||
* @method Place set_latitude( float $latitude ) Sets the latitude of the place.
|
||||
* @method Place set_longitude( float $longitude ) Sets the longitude of the place.
|
||||
* @method Place set_radius( float $radius ) Sets the radius from the given latitude and longitude.
|
||||
* @method Place set_units( string $units ) Sets the measurement units for radius and altitude.
|
||||
*/
|
||||
class Place extends Base_Object {
|
||||
/**
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* Quote_Authorization is an implementation of the QuoteAuthorization activity type,
|
||||
* as defined in FEP-044f (https://codeberg.org/fediverse/fep/src/branch/main/fep/044f/fep-044f.md#quoteauthorization).
|
||||
*
|
||||
* This class represents a QuoteAuthorization activity for ActivityPub implementations.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
namespace Activitypub\Activity\Extended_Object;
|
||||
|
||||
use Activitypub\Activity\Base_Object;
|
||||
|
||||
/**
|
||||
* Class representing a QuoteAuthorization activity.
|
||||
*
|
||||
* @see https://codeberg.org/fediverse/fep/src/branch/main/fep/044f/fep-044f.md#quoteauthorization
|
||||
*
|
||||
* @since 7.5.0
|
||||
*
|
||||
* @method Base_Object|string|array|null get_interacting_object() Gets the interacting object property of the object.
|
||||
* @method Base_Object|string|array|null get_interaction_target() Gets the interaction target property of the object.
|
||||
*
|
||||
* @method Quote_Authorization set_interacting_object( string|array|Base_Object|null $data ) Sets the interacting object property of the object.
|
||||
* @method Quote_Authorization set_interaction_target( string|array|Base_Object|null $data ) Sets the interaction target property of the object.
|
||||
*/
|
||||
class Quote_Authorization extends Base_Object {
|
||||
/**
|
||||
* The JSON-LD context for the object.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
const JSON_LD_CONTEXT = array(
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
array(
|
||||
'QuoteAuthorization' => 'https://w3id.org/fep/044f#QuoteAuthorization',
|
||||
'gts' => 'https://gotosocial.org/ns#',
|
||||
'interactingObject' => array(
|
||||
'@id' => 'gts:interactingObject',
|
||||
'@type' => '@id',
|
||||
),
|
||||
'interactionTarget' => array(
|
||||
'@id' => 'gts:interactionTarget',
|
||||
'@type' => '@id',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
* The type of the object.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $type = 'QuoteAuthorization';
|
||||
|
||||
/**
|
||||
* The object that is being interacted with.
|
||||
*
|
||||
* @var Base_Object|string|array|null
|
||||
*/
|
||||
protected $interacting_object;
|
||||
|
||||
/**
|
||||
* The target of the interaction.
|
||||
*
|
||||
* @var Base_Object|string|array|null
|
||||
*/
|
||||
protected $interaction_target;
|
||||
}
|
||||
Reference in New Issue
Block a user