updated plugin Event Bridge for ActivityPub version 1.3.0

This commit is contained in:
2026-06-03 21:28:57 +00:00
committed by Gitium
parent 1f3438440f
commit f2d6714572
84 changed files with 1721 additions and 1361 deletions

View File

@ -0,0 +1,101 @@
<?php
/**
* FEP-8a8e compatible representation of an Event in ActivityStreams.
*
* See: https://codeberg.org/Event-Federation/gatherpress-activitypub/src/branch/main/includes/classes/class-event-fep-8a8e.php
*
* @package Event_Bridge_For_ActivityPub
* @since 1.3.0
* @license AGPL-3.0-or-later
*/
namespace Event_Bridge_For_ActivityPub\ActivityPub\Object;
use Activitypub\Activity\Base_Object;
/**
* Event is an implementation of Activity Streams Event object type.
*
* This class contains extensions from FEP-8a8e: A common approach to using the Event object type.
*
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event
* @see https://w3id.org/fep/8a8ae
*
* @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 string|null get_event_status() Gets the event's status.
* @method string|null get_timezone() Gets the timezone of the event.
*
* @method Event_FEP_8a8e set_maximum_attendee_capacity( int $capacity ) Sets how many places there can be for an event.
* @method Event_FEP_8a8e set_name( string $name ) Sets the title of the event.
* @method Event_FEP_8a8e set_event_status( string $status ) Sets the event's status.
* @method Event_FEP_8a8e set_timezone( string $timezone ) Sets the timezone of the event.
*/
class Event_FEP_8a8e extends Base_Object {
/**
* The JSON-LD Context.
*
* @var array
*/
const JSON_LD_CONTEXT = array(
'https://schema.org/', // The base context is schema.org, because it is used a lot.
'https://w3id.org/fep/8a8e', // FEP-8a8e context.
'https://www.w3.org/ns/activitystreams', // The ActivityStreams context overrides everything also defined in schema.org.
);
/**
* Event is an implementation of one of the Activity Streams.
*
* @var string
*/
protected $type = 'Event';
/**
* The title of the event.
*
* @var string
*/
protected $name;
/**
* Timezone of the event.
*
* @context https://w3id.org/fep/8a8e/timezone
* @var string
*/
protected $timezone;
/**
* The event's status.
*
* @context https://w3id.org/fep/8a8e/eventStatus
* @var string
*/
protected $event_status = 'EventScheduled';
/**
* How many places there can be for an event.
*
* @context https://schema.org/maximumAttendeeCapacity
* @var int
*/
protected $maximum_attendee_capacity;
/**
* Attendees collection
*
* @context https://w3id.org/fep/8a8e/attendees
*
* @var array
*/
protected $attendees;
/**
* URL to an iCal file.
*
* @context https://w3id.org/fep/8a8e/ical
*
* @var string
*/
protected $ical;
}

View File

@ -0,0 +1,119 @@
<?php
/**
* Event is an implementation of one of the Activity Streams Event object type
*
* See https://codeberg.org/Event-Federation/gatherpress-activitypub/src/branch/main/includes/classes/class-place.php
*
* @package GatherPress_ActivityPUb
*/
namespace Event_Bridge_For_ActivityPub\ActivityPub\Object;
use Activitypub\Activity\Base_Object;
/**
* Place is an implementation of the Activity Streams Place object type.
*
* The Place object represents a logical or physical location.
*
* @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 {
/**
* Place is an implementation of one of the
* Activity Streams
*
* @var string
*/
protected $type = 'Place';
/**
* Indicates the accuracy of position coordinates on a Place objects.
* Expressed in properties of percentage. e.g. "94.0" means "94.0% accurate".
*
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accuracy
* @var float xsd:float [>= 0.0f, <= 100.0f]
*/
protected $accuracy;
/**
* Indicates the altitude of a place. The measurement unit is indicated using the unit's property.
* If unit is not specified, the default is assumed to be "m" indicating meters.
*
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-altitude
* @var float xsd:float
*/
protected $altitude;
/**
* The latitude of a place.
*
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-latitude
* @var float xsd:float
*/
protected $latitude;
/**
* The longitude of a place.
*
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-longitude
* @var float xsd:float
*/
protected $longitude;
/**
* The radius from the given latitude and longitude for a Place.
*
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-radius
* @var float
*/
protected $radius;
/**
* Specifies the measurement units for the `radius` and `altitude` properties.
*
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-units
* @var string
*/
protected $units;
/**
* The address of the place.
*
* @see https://schema.org/PostalAddress
* @var array|string
*/
protected $address;
/**
* External URL/Website of the place/venue.
*
* @see https://schema.org/sameAs
* @var string
*/
protected $same_as;
/**
* Telephone number of the place.
*
* @see https://schema.org/telephone
* @var string
*/
protected $telephone;
}