[FreeNetwork] First step towards de-duplication mechanism for federation

Refactored AS2 inside AP; [ENTITY][Activity] went from core to AP
Webfinger plugin will be part of FreeNetwork component
This commit is contained in:
Diogo Peralta Cordeiro 2021-10-04 17:00:58 +01:00
parent bd5c426046
commit 517ed953f2
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0
145 changed files with 1156 additions and 632 deletions

View File

@ -0,0 +1,214 @@
<?php
// {{{ License
// This file is part of GNU social - https://www.gnu.org/software/social
//
// GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// GNU social is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}}
/**
* WebFinger implementation for GNU social
*
* @package GNUsocial
*
* @author Diogo Peralta Cordeiro <mail@diogo.site
* @copyright 2021 Free Software Foundation, Inc http://www.fsf.org
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/
namespace Component\FreeNetwork\Entity;
use App\Core\DB\DB;
use App\Core\Entity;
use App\Core\Event;
use DateTimeInterface;
/**
* Table Definition for freenetwork_actor
*
* @author Diogo Peralta Cordeiro <mail@diogo.site
* @copyright 2021 Free Software Foundation, Inc http://www.fsf.org
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/
class FreenetworkActor extends Entity
{
// {{{ Autocode
// @codeCoverageIgnoreStart
private string $actor_uri;
private string $source;
private int $actor_id;
private bool $is_local;
private \DateTimeInterface $created;
private \DateTimeInterface $modified;
/**
* @return string
*/
public function getActorUri(): string
{
return $this->actor_uri;
}
/**
* @param string $actor_uri
*/
public function setActorUri(string $actor_uri): void
{
$this->actor_uri = $actor_uri;
}
/**
* @return string
*/
public function getSource(): string
{
return $this->source;
}
/**
* @param string $source
*/
public function setSource(string $source): void
{
$this->source = $source;
}
/**
* @return int
*/
public function getActorId(): int
{
return $this->actor_id;
}
/**
* @param int $actor_id
*/
public function setActorId(int $actor_id): void
{
$this->actor_id = $actor_id;
}
/**
* @return bool
*/
public function isIsLocal(): bool
{
return $this->is_local;
}
/**
* @param bool $is_local
*/
public function setIsLocal(bool $is_local): void
{
$this->is_local = $is_local;
}
/**
* @return DateTimeInterface
*/
public function getCreated(): DateTimeInterface
{
return $this->created;
}
/**
* @param DateTimeInterface $created
*/
public function setCreated(DateTimeInterface $created): void
{
$this->created = $created;
}
/**
* @return DateTimeInterface
*/
public function getModified(): DateTimeInterface
{
return $this->modified;
}
/**
* @param DateTimeInterface $modified
*/
public function setModified(DateTimeInterface $modified): void
{
$this->modified = $modified;
}
// @codeCoverageIgnoreEnd
// }}} Autocode
public static function getOrCreateById($actor_id, $source): self
{
$fnactor = self::getWithPK(['actor_id' => $actor_id, 'source' => $source]);
if ($fnactor === null) {
$actor_uri = null;
Event::handle('FreeNetworkGenerateLocalActorUri', [$source, $actor_id, &$actor_uri]);
$fnactor = self::create([
'actor_uri' => $actor_uri,
'source' => $source,
'actor_id' => $actor_id,
'is_local' => true,
]);
DB::persist($fnactor);
return $fnactor;
} else {
return $fnactor;
}
}
public static function getOrCreateByUri($actor_uri, $source): self
{
$fnactor = DB::findBy('freenetwork_actor', ['actor_uri' => $actor_uri, 'source' => $source]);
if ($fnactor === []) {
// TODO grab with webfinger
// If already has for a different protocol and isn't local, update
// else create actor and then fnactor
$fnactor = self::create([
'actor_uri' => $actor_uri,
'source' => $source,
'actor_id' => 1,
'is_local' => false,
]);
DB::persist($fnactor);
return $fnactor;
} else {
return $fnactor[0];
}
}
public static function schemaDef()
{
return [
'name' => 'freenetwork_actor',
'fields' => [
'actor_uri' => ['type' => 'text', 'not null' => true],
'source' => ['type' => 'varchar', 'not null' => true, 'foreign key' => true, 'length' => 32, 'target' => 'NoteSource.code', 'multiplicity' => 'many to one', 'description' => 'fkey to source of note, like "web", "im", or "clientname"'],
'actor_id' => ['type' => 'int', 'not null' => true],
'is_local' => ['type' => 'bool', 'not null' => true, 'description' => 'whether this was a locally generated or an imported actor'],
'created' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was created'],
'modified' => ['type' => 'timestamp', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'],
],
'primary key' => ['actor_id', 'source'],
'indexes' => [
'freenetwork_actor_uri_idx' => ['actor_uri', 'source'],
],
'foreign keys' => [
'freenetwork_actor_actor_id_fkey' => ['actor', ['actor_id' => 'id']],
],
];
}
}

View File

@ -0,0 +1,26 @@
<?php
// {{{ License
// This file is part of GNU social - https://www.gnu.org/software/social
//
// GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// GNU social is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}}
namespace Component\FreeNetwork;
use App\Core\Modules\Component;
class FreeNetwork extends Component
{
}

View File

@ -5,9 +5,12 @@ namespace Plugin\ActivityPub;
use App\Core\Event;
use App\Core\Modules\Plugin;
use App\Core\Router\RouteLoader;
use App\Core\Router\Router;
use Exception;
use Plugin\ActivityPub\Controller\Inbox;
use Plugin\ActivityStreamsTwo\ActivityStreamsTwo;
use Plugin\ActivityPub\Util\Response\ActorResponse;
use Plugin\ActivityPub\Util\Response\NoteResponse;
use Plugin\ActivityPub\Util\Response\TypeResponse;
class ActivityPub extends Plugin
{
@ -18,7 +21,7 @@ class ActivityPub extends Plugin
/**
* This code executes when GNU social creates the page routing, and we hook
* on this event to add our action handler for Embed.
* on this event to add our Inbox and Outbox handler for ActivityPub.
*
* @param RouteLoader $r the router that was initialized.
*
@ -30,19 +33,19 @@ class ActivityPub extends Plugin
'activitypub_actor_inbox',
'/actor/{gsactor_id<\d+>}/inbox.json',
[Inbox::class, 'handle'],
options: ['accept' => ActivityStreamsTwo::$accept_headers]
options: ['accept' => self::$accept_headers]
);
$r->connect(
'activitypub_actor_outbox',
'/actor/{gsactor_id<\d+>}/outbox.json',
[Inbox::class, 'handle'],
options: ['accept' => ActivityStreamsTwo::$accept_headers]
options: ['accept' => self::$accept_headers]
);
$r->connect(
'activitypub_inbox',
'/inbox.json',
[Inbox::class, 'handle'],
options: ['accept' => ActivityStreamsTwo::$accept_headers]
options: ['accept' => self::$accept_headers]
);
return Event::next;
}
@ -53,19 +56,20 @@ class ActivityPub extends Plugin
* @param null|array|string $accept
* @param bool $strict Strict mode
*
* @throws \Exception when strict mode enabled
* @throws Exception when strict mode enabled
*
* @return bool
*
*/
public static function validateAcceptHeader(array|string|null $accept, bool $strict): bool
{
if (is_string($accept)
&& in_array($accept, ActivityStreamsTwo::$accept_headers)
&& in_array($accept, self::$accept_headers)
) {
return true;
} elseif (is_array($accept)
&& count(
array_intersect($accept, ActivityStreamsTwo::$accept_headers)
array_intersect($accept, self::$accept_headers)
) > 0
) {
return true;
@ -82,4 +86,65 @@ class ActivityPub extends Plugin
)
);
}
public static array $accept_headers = [
'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
'application/activity+json',
'application/json',
'application/ld+json',
];
/**
* @param string $route
* @param array $accept_header
* @param array $vars
* @param null|TypeResponse $response
*
* @throws Exception
*
* @return bool
*
*
*/
public function onControllerResponseInFormat(string $route, array $accept_header, array $vars, ?TypeResponse &$response = null): bool
{
if (count(array_intersect(self::$accept_headers, $accept_header)) === 0) {
return Event::next;
}
switch ($route) {
case 'actor_view_id':
case 'actor_view_nickname':
$response = ActorResponse::handle($vars['actor']);
return Event::stop;
case 'note_view':
$response = NoteResponse::handle($vars['note']);
return Event::stop;
/*case 'actor_favourites_id':
case 'actor_favourites_nickname':
$response = LikeResponse::handle($vars['actor']);
return Event::stop;
case 'actor_subscriptions_id':
case 'actor_subscriptions_nickname':
$response = FollowingResponse::handle($vars['actor']);
return Event::stop;
case 'actor_subscribers_id':
case 'actor_subscribers_nickname':
$response = FollowersResponse::handle($vars['actor']);
return Event::stop;*/
default:
if (Event::handle('ActivityStreamsTwoResponse', [$route, &$response])) {
return Event::stop;
}
return Event::next;
}
}
public function onFreeNetworkGenerateLocalActorUri(string $source, int $actor_id, ?string &$actor_uri): bool
{
if ($source !== 'ActivityPub') {
return Event::next;
}
$actor_uri = Router::url('actor_view_id', ['id' => $actor_id], Router::ABSOLUTE_URL);
return Event::stop;
}
}

View File

@ -26,10 +26,10 @@ use App\Core\DB\DB;
use function App\Core\I18n\_m;
use App\Util\Exception\ClientException;
use Plugin\ActivityPub\ActivityPub;
use Plugin\ActivityStreamsTwo\Util\Model\AS2ToEntity\AS2ToEntity;
use Plugin\ActivityStreamsTwo\Util\Response\TypeResponse;
use Plugin\ActivityStreamsTwo\Util\Type;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityPub\Util\Model\AS2ToEntity\AS2ToEntity;
use Plugin\ActivityPub\Util\Response\TypeResponse;
use Plugin\ActivityPub\Util\Type;
use Plugin\ActivityPub\Util\Type\Util;
class Inbox extends Controller
{
@ -51,7 +51,7 @@ class Inbox extends Controller
true
);
// Check current actor can post
// TODO: Check if Actor can post
// Get content
$payload = Util::decodeJson(
@ -60,12 +60,12 @@ class Inbox extends Controller
// Cast as an ActivityStreams type
$type = Type::create($payload);
dd(AS2ToEntity::translate(activity: $type->toArray()['object'], source: 'ActivityPub'));
// $http_signature = new HttpSignature($this->server);
// if ($http_signature->verify($request)) {
// return new Response('', 201);
// }
// TODO: Check if Actor has authority over payload
// Store Activity
dd(AS2ToEntity::store(activity: $type->toArray(), source: 'ActivityPub'));
DB::flush();
return new TypeResponse($type, status: 202);
}

View File

@ -19,7 +19,7 @@
// }}}
namespace App\Entity;
namespace Plugin\ActivityPub\Entity;
use App\Core\DB\DB;
use App\Core\Entity;
@ -32,21 +32,25 @@ use DateTimeInterface;
* @package GNUsocial
*
* @author Hugo Sales <hugo@hsal.es>
* @author Diogo Peralta Cordeiro <mail@diogo.site>
* @copyright 2020-2021 Free Software Foundation, Inc http://www.fsf.org
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/
class Activity extends Entity
class ActivitypubActivity extends Entity
{
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $id;
private string $activity_uri;
private int $actor_id;
private string $verb;
private string $object_type;
private int $object_id;
private string $object_uri;
private bool $is_local;
private ?string $source;
private \DateTimeInterface $created;
private \DateTimeInterface $modified;
public function setId(int $id): self
{
@ -59,6 +63,17 @@ class Activity extends Entity
return $this->id;
}
public function getActivityUri(): string
{
return $this->activity_uri;
}
public function setActivityUri(string $activity_uri): self
{
$this->activity_uri = $activity_uri;
return $this;
}
public function setActorId(int $actor_id): self
{
$this->actor_id = $actor_id;
@ -103,6 +118,17 @@ class Activity extends Entity
return $this->object_id;
}
public function getObjectUri(): string
{
return $this->object_uri;
}
public function setObjectUri(string $object_uri): self
{
$this->object_uri = $object_uri;
return $this;
}
public function setIsLocal(bool $is_local): self
{
$this->is_local = $is_local;
@ -136,24 +162,42 @@ class Activity extends Entity
return $this->created;
}
public function setModified(DateTimeInterface $modified): self
{
$this->modified = $modified;
return $this;
}
public function getModified(): DateTimeInterface
{
return $this->modified;
}
// @codeCoverageIgnoreEnd
// }}} Autocode
public static function schemaDef(): array
{
return [
'name' => 'activity',
'name' => 'activitypub_activity',
'fields' => [
'id' => ['type' => 'serial', 'not null' => true],
'actor_id' => ['type' => 'int', 'not null' => true, 'description' => 'foreign key to actor table'],
'activity_uri' => ['type' => 'text', 'not null' => true, 'description' => 'Activity\'s URI'],
'actor_id' => ['type' => 'int', 'foreign key' => true, 'target' => 'Actor.id', 'multiplicity' => 'one to one', 'not null' => true, 'description' => 'who made the note'],
'verb' => ['type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'internal activity verb, influenced by activity pub verbs'],
'object_type' => ['type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'the name of the table this object refers to'],
'object_id' => ['type' => 'int', 'not null' => true, 'description' => 'id in the referenced table'],
'object_type' => ['type' => 'varchar', 'length' => 32, 'description' => 'the name of the table this object refers to'],
'object_id' => ['type' => 'int', 'description' => 'id in the referenced table'],
'object_uri' => ['type' => 'text', 'not null' => true, 'description' => 'Object\'s URI'],
'is_local' => ['type' => 'bool', 'not null' => true, 'description' => 'whether this was a locally generated or an imported activity'],
'source' => ['type' => 'varchar', 'length' => 32, 'description' => 'the source of this activity'],
'created' => ['type' => 'datetime', 'not null' => true, 'description' => 'date this record was created', 'default' => 'CURRENT_TIMESTAMP'],
'created' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was created'],
'modified' => ['type' => 'timestamp', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'],
],
'primary key' => ['id'],
'indexes' => [
'activity_activity_uri_idx' => ['activity_uri'],
'activity_object_uri_idx' => ['object_uri'],
],
];
}
}

View File

@ -0,0 +1,170 @@
<?php
// {{{ License
// This file is part of GNU social - https://www.gnu.org/software/social
//
// GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// GNU social is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}}
/**
* ActivityPub implementation for GNU social
*
* @package GNUsocial
*
* @author Diogo Peralta Cordeiro <mail@diogo.site
* @copyright 2021 Free Software Foundation, Inc http://www.fsf.org
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/
namespace Plugin\ActivityPub\Entity;
use App\Core\Entity;
use DateTimeInterface;
/**
* Table Definition for activitypub_actor
*
* @author Diogo Peralta Cordeiro <mail@diogo.site
* @copyright 2021 Free Software Foundation, Inc http://www.fsf.org
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/
class ActivitypubActor extends Entity
{
// {{{ Autocode
// @codeCoverageIgnoreStart
private string $uri;
private int $actor_id;
private string $inbox_uri;
private ?string $inbox_shared_uri = null;
private \DateTimeInterface $created;
private \DateTimeInterface $modified;
/**
* @return string
*/
public function getUri(): string
{
return $this->uri;
}
/**
* @param string $uri
*/
public function setUri(string $uri): void
{
$this->uri = $uri;
}
/**
* @return int
*/
public function getActorId(): int
{
return $this->actor_id;
}
/**
* @param int $actor_id
*/
public function setActorId(int $actor_id): void
{
$this->actor_id = $actor_id;
}
/**
* @return string
*/
public function getInboxUri(): string
{
return $this->inbox_uri;
}
/**
* @param string $inbox_uri
*/
public function setInboxUri(string $inbox_uri): void
{
$this->inbox_uri = $inbox_uri;
}
/**
* @return string
*/
public function getInboxSharedUri(): string
{
return $this->inbox_shared_uri;
}
/**
* @param string $inbox_shared_uri
*/
public function setInboxSharedUri(string $inbox_shared_uri): void
{
$this->inbox_shared_uri = $inbox_shared_uri;
}
/**
* @return DateTimeInterface
*/
public function getCreated(): DateTimeInterface
{
return $this->created;
}
/**
* @param DateTimeInterface $created
*/
public function setCreated(DateTimeInterface $created): void
{
$this->created = $created;
}
/**
* @return DateTimeInterface
*/
public function getModified(): DateTimeInterface
{
return $this->modified;
}
/**
* @param DateTimeInterface $modified
*/
public function setModified(DateTimeInterface $modified): void
{
$this->modified = $modified;
}
// @codeCoverageIgnoreEnd
// }}} Autocode
public static function schemaDef()
{
return [
'name' => 'activitypub_actor',
'fields' => [
'uri' => ['type' => 'text', 'not null' => true],
'actor_id' => ['type' => 'int', 'not null' => true],
'inbox_uri' => ['type' => 'text', 'not null' => true],
'inbox_shared_uri' => ['type' => 'text'],
'created' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was created'],
'modified' => ['type' => 'timestamp', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'],
],
'primary key' => ['actor_id'],
'foreign keys' => [
'activitypub_actor_actor_id_fkey' => ['actor', ['actor_id' => 'id']],
],
];
}
}

View File

@ -0,0 +1,77 @@
<?php
namespace Plugin\ActivityPub\Util\Model\AS2ToEntity;
use App\Core\DB\DB;
use App\Core\Event;
use App\Util\Exception\ClientException;
use App\Util\Formatting;
use Component\FreeNetwork\Entity\FreenetworkActor;
use DateTime;
use Plugin\ActivityPub\Entity\ActivitypubActivity;
abstract class AS2ToEntity
{
public static function activity_stream_two_verb_to_gs_verb($verb)
{
return match ($verb) {
'Create' => 'create',
default => throw new ClientException('Invalid verb'),
};
}
public static function activity_stream_two_object_type_to_gs_table($verb)
{
return match ($verb) {
'Note' => 'note',
default => throw new ClientException('Invalid verb'),
};
}
/**
* @param array $activity
* @param null|string $source
*
* @throws ClientException
*
* @return array
*/
public static function store(array $activity, ?string $source = null): array
{
$map = [
'activity_uri' => $activity['id'],
'actor_id' => FreenetworkActor::getOrCreateByUri(actor_uri: $activity['actor'], source: 'ActivityPub')->getActorId(),
'verb' => self::activity_stream_two_verb_to_gs_verb($activity['type']),
'object_type' => self::activity_stream_two_object_type_to_gs_table($activity['object']['type']),
'object_uri' => $activity['object']['id'],
'is_local' => false,
'created' => new DateTime($activity['published'] ?? 'now'),
'modified' => new DateTime(),
'source' => $source,
];
$act = new ActivitypubActivity();
foreach ($map as $prop => $val) {
$set = Formatting::snakeCaseToCamelCase("set_{$prop}");
$act->{$set}($val);
}
$obj = null;
switch ($activity['object']['type']) {
case'Note':
$obj = AS2ToNote::translate($activity['object'], $source);
break;
default:
if (!Event::handle('ActivityPubObject', [$activity['object']['type'], $activity['object'], &$obj])) {
throw new ClientException('Unsupported Object type.');
}
break;
}
DB::persist($obj);
$act->setObjectId($obj->getId());
DB::persist($act);
return [$act, $obj];
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace Plugin\ActivityStreamsTwo\Util\Model\AS2ToEntity;
namespace Plugin\ActivityPub\Util\Model\AS2ToEntity;
use App\Core\Event;
use App\Entity\Actor;
@ -33,7 +33,7 @@ abstract class AS2ToGSActor
$map['content'],
$map['content_type'],
&$map['rendered'],
Actor::getFromId(1), // just for testing
Actor::getById(1), // just for testing
null, // reply to
]);
}

View File

@ -0,0 +1,52 @@
<?php
namespace Plugin\ActivityPub\Util\Model\AS2ToEntity;
use App\Core\Event;
use App\Entity\Actor;
use App\Entity\Note;
use App\Util\Formatting;
use Component\FreeNetwork\Entity\FreenetworkActor;
use DateTime;
abstract class AS2ToNote
{
/**
* @param array $object
*
*@throws \Exception
*
* @return Note
*
*/
public static function translate(array $object, ?string $source = null): Note
{
$actor_id = FreenetworkActor::getOrCreateByUri(actor_uri: $object['attributedTo'], source: 'ActivityPub')->getActorId();
$map = [
'is_local' => false,
'created' => new DateTime($object['published'] ?? 'now'),
'content' => $object['content'] ?? null,
'content_type' => 'text/html',
'url' => array_key_exists('url', $object) ? $object['url'] : $object['id'],
'actor_id' => $actor_id,
'modified' => new DateTime(),
'source' => $source,
];
if ($map['content'] !== null) {
Event::handle('RenderNoteContent', [
$map['content'],
$map['content_type'],
&$map['rendered'],
Actor::getById($actor_id),
null, // TODO reply to
]);
}
$obj = new Note();
foreach ($map as $prop => $val) {
$set = Formatting::snakeCaseToCamelCase("set_{$prop}");
$obj->{$set}($val);
}
return $obj;
}
}

View File

@ -1,9 +1,9 @@
<?php
namespace Plugin\ActivityStreamsTwo\Util\Model\EntityToType;
namespace Plugin\ActivityPub\Util\Model\EntityToType;
use App\Core\Entity;
use Plugin\ActivityStreamsTwo\Util\Type;
use Plugin\ActivityPub\Util\Type;
abstract class EntityToType
{

View File

@ -1,14 +1,15 @@
<?php
namespace Plugin\ActivityStreamsTwo\Util\Model\EntityToType;
namespace Plugin\ActivityPub\Util\Model\EntityToType;
use App\Core\Event;
use App\Core\Router\Router;
use App\Entity\Actor;
use Component\Avatar\Avatar;
use Component\Avatar\Exception\NoAvatarException;
use DateTimeInterface;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type;
use Plugin\ActivityPub\Util\Type;
class GSActorToType
{
@ -22,7 +23,8 @@ class GSActorToType
*/
public static function translate(Actor $gsactor)
{
$uri = Router::url('actor_view_id', ['id' => $gsactor->getId()], Router::ABSOLUTE_URL);
$uri = null;
Event::handle('FreeNetworkGenerateLocalActorUri', ['source' => 'ActivityPub', 'actor_id' => $gsactor->getId(), 'actor_uri' => &$attributedTo]);
$attr = [
'@context' => 'https://www.w3.org/ns/activitystreams',
'id' => $uri,

View File

@ -1,11 +1,12 @@
<?php
namespace Plugin\ActivityStreamsTwo\Util\Model\EntityToType;
namespace Plugin\ActivityPub\Util\Model\EntityToType;
use App\Core\Event;
use App\Core\Router\Router;
use App\Entity\Note;
use DateTimeInterface;
use Plugin\ActivityStreamsTwo\Util\Type;
use Plugin\ActivityPub\Util\Type;
class NoteToType
{
@ -18,11 +19,13 @@ class NoteToType
*/
public static function translate(Note $note)
{
$attributedTo = null;
Event::handle('FreeNetworkGenerateLocalActorUri', ['source' => 'ActivityPub', 'actor_id' => $note->getActorId(), 'actor_uri' => &$attributedTo]);
$attr = [
'@context' => 'https://www.w3.org/ns/activitystreams',
'id' => Router::url('note_view', ['id' => $note->getId()], Router::ABSOLUTE_URL),
'published' => $note->getCreated()->format(DateTimeInterface::RFC3339),
'attributedTo' => Router::url('actor_view_id', ['id' => $note->getActorId()], Router::ABSOLUTE_URL),
'attributedTo' => $attributedTo,
//'to' => $to,
//'cc' => $cc,
'content' => json_encode($note->getRendered()),

View File

@ -1,8 +1,8 @@
<?php
namespace Plugin\ActivityStreamsTwo\Util\Response;
namespace Plugin\ActivityPub\Util\Response;
use Plugin\ActivityStreamsTwo\Util\Model\EntityToType\EntityToType;
use Plugin\ActivityPub\Util\Model\EntityToType\EntityToType;
abstract class AbstractResponse
{

View File

@ -1,10 +1,10 @@
<?php
namespace Plugin\ActivityStreamsTwo\Util\Response;
namespace Plugin\ActivityPub\Util\Response;
use App\Entity\Actor;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Model\EntityToType\GSActorToType;
use Plugin\ActivityPub\Util\Model\EntityToType\GSActorToType;
abstract class ActorResponse
{

View File

@ -1,10 +1,10 @@
<?php
namespace Plugin\ActivityStreamsTwo\Util\Response;
namespace Plugin\ActivityPub\Util\Response;
use App\Entity\Note;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Model\EntityToType\NoteToType;
use Plugin\ActivityPub\Util\Model\EntityToType\NoteToType;
abstract class NoteResponse
//class NoteResponse extends Controller

View File

@ -1,6 +1,6 @@
<?php
namespace Plugin\ActivityStreamsTwo\Util\Response;
namespace Plugin\ActivityPub\Util\Response;
use Symfony\Component\HttpFoundation\JsonResponse;

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util;
namespace Plugin\ActivityPub\Util;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\AbstractObject;
use Plugin\ActivityStreamsTwo\Util\Type\TypeResolver;
use Plugin\ActivityStreamsTwo\Util\Type\Validator;
use Plugin\ActivityPub\Util\Type\AbstractObject;
use Plugin\ActivityPub\Util\Type\TypeResolver;
use Plugin\ActivityPub\Util\Type\Validator;
/**
* \ActivityPhp\Type is a Factory for ActivityStreams 2.0 types.

View File

@ -9,11 +9,11 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type;
namespace Plugin\ActivityPub\Util\Type;
use function array_key_exists;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type;
use Plugin\ActivityPub\Util\Type;
use ReflectionClass;
/**

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Core;
namespace Plugin\ActivityPub\Util\Type\Core;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Core\AbstractActivity implements only common
* \Plugin\ActivityPub\Util\Type\Core\AbstractActivity implements only common
* attributes between Activity and IntransitiveActivity.
*
* It SHOULD NOT be used as if.
@ -38,7 +38,7 @@ abstract class AbstractActivity extends ObjectType
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-actor
*
* @var string
* | \Plugin\ActivityStreamsTwo\Util\Type\Extended\AbstractActor
* | \Plugin\ActivityPub\Util\Type\Extended\AbstractActor
* | array<Actor>
* | array<Link>
* | Link

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Core;
namespace Plugin\ActivityPub\Util\Type\Core;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Core\Activity is an implementation of one of the
* \Plugin\ActivityPub\Util\Type\Core\Activity is an implementation of one of the
* Activity Streams Core Types.
*
* Activity objects are specializations of the base Object type that

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Core;
namespace Plugin\ActivityPub\Util\Type\Core;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Core\Collection is an implementation of one of the
* \Plugin\ActivityPub\Util\Type\Core\Collection is an implementation of one of the
* Activity Streams Core Types.
*
* Collection objects are a specialization of the base Object that serve

View File

@ -9,7 +9,7 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Core;
namespace Plugin\ActivityPub\Util\Type\Core;
/**
* CollectionPage is an implementation of one

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Core;
namespace Plugin\ActivityPub\Util\Type\Core;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Core\IntransitiveActivity is an implementation of
* \Plugin\ActivityPub\Util\Type\Core\IntransitiveActivity is an implementation of
* one of the Activity Streams Core Types.
*
* IntransitiveActivity objects are specializations of the Activity type

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Core;
namespace Plugin\ActivityPub\Util\Type\Core;
use Plugin\ActivityStreamsTwo\Util\Type\AbstractObject;
use Plugin\ActivityPub\Util\Type\AbstractObject;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Core\Link is an implementation of one of the
* \Plugin\ActivityPub\Util\Type\Core\Link is an implementation of one of the
* Activity Streams Core Types.
*
* A Link describes a qualified, indirect reference to another resource.

View File

@ -9,9 +9,9 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Core;
namespace Plugin\ActivityPub\Util\Type\Core;
use Plugin\ActivityStreamsTwo\Util\Type\AbstractObject;
use Plugin\ActivityPub\Util\Type\AbstractObject;
/**
* ObjectType is an implementation of one of the

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Core;
namespace Plugin\ActivityPub\Util\Type\Core;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Core\OrderedCollection is an implementation of one
* \Plugin\ActivityPub\Util\Type\Core\OrderedCollection is an implementation of one
* of the Activity Streams Core Types.
*
* A subtype of Collection in which members of the logical collection

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Core;
namespace Plugin\ActivityPub\Util\Type\Core;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Core\OrderedCollection is an implementation of one
* \Plugin\ActivityPub\Util\Type\Core\OrderedCollection is an implementation of one
* of the Activity Streams Core Types.
*
* The OrderedCollectionPage type extends from both CollectionPage and

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended;
namespace Plugin\ActivityPub\Util\Type\Extended;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityStreamsTwo\Util\Type\Core\OrderedCollection;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Core\OrderedCollection;
/**
* \ActivityPhp\Type\Extended\AbstractActor is an abstract class that

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Accept is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Accept is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor accepts the object. The target property can

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Announce is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Announce is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor is calling the target's attention the

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Block is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Block is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor is blocking the object. Blocking is a

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Create is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Create is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor has created the object.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Delete is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Delete is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor has deleted the object. If specified, the

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Follow is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Follow is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor is "following" the object. Following is

View File

@ -9,9 +9,9 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \ActivityPhp\Type\Extended\Activity\Ignore is an implementation of

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Join is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Join is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor has joined the object.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Leave is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Leave is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor has left the object.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Like is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Like is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor likes, recommends or endorses the object.

View File

@ -9,13 +9,13 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\IntransitiveActivity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Core\IntransitiveActivity;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Question is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Question is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents a question being asked. Question objects are an extension
@ -43,7 +43,7 @@ class Question extends IntransitiveActivity
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-oneof
*
* @var array<ObjectType>
* | array<\Plugin\ActivityStreamsTwo\Util\Type\Core\Link>
* | array<\Plugin\ActivityPub\Util\Type\Core\Link>
* | null
*/
protected array $oneOf;
@ -55,7 +55,7 @@ class Question extends IntransitiveActivity
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-anyof
*
* @var array<ObjectType>
* | array<\Plugin\ActivityStreamsTwo\Util\Type\Core\Link>
* | array<\Plugin\ActivityPub\Util\Type\Core\Link>
* | null
*/
protected array $anyOf;
@ -67,7 +67,7 @@ class Question extends IntransitiveActivity
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-closed
*
* @var ObjectType
* | \Plugin\ActivityStreamsTwo\Util\Type\Core\Link
* | \Plugin\ActivityPub\Util\Type\Core\Link
* | \DateTime
* | bool
* | null

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Reject is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Reject is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor is rejecting the object.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Remove is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Remove is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor is removing the object.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Undo is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Undo is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor is undoing the object. In most cases, the

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity;
namespace Plugin\ActivityPub\Util\Type\Extended\Activity;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Activity;
use Plugin\ActivityPub\Util\Type\Core\Activity;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Update is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Activity\Update is an implementation of
* one of the Activity Streams Extended Types.
*
* Indicates that the actor has updated the object. Note, however, that

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Actor;
namespace Plugin\ActivityPub\Util\Type\Extended\Actor;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\AbstractActor;
use Plugin\ActivityPub\Util\Type\Extended\AbstractActor;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Actor\Application is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Actor\Application is an implementation of
* one of the Activity Streams Extended Types.
*
* Describes a software application.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Actor;
namespace Plugin\ActivityPub\Util\Type\Extended\Actor;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\AbstractActor;
use Plugin\ActivityPub\Util\Type\Extended\AbstractActor;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Actor\Group is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Actor\Group is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents a formal or informal collective of Actors.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Actor;
namespace Plugin\ActivityPub\Util\Type\Extended\Actor;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\AbstractActor;
use Plugin\ActivityPub\Util\Type\Extended\AbstractActor;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Actor\Organization is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Actor\Organization is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents a formal or informal collective of Actors.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Actor;
namespace Plugin\ActivityPub\Util\Type\Extended\Actor;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\AbstractActor;
use Plugin\ActivityPub\Util\Type\Extended\AbstractActor;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Actor\Person is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Actor\Person is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents an individual person.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Actor;
namespace Plugin\ActivityPub\Util\Type\Extended\Actor;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\AbstractActor;
use Plugin\ActivityPub\Util\Type\Extended\AbstractActor;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Actor\Service is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Actor\Service is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents a service of any kind.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Article is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Article is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents any kind of multi-paragraph written work.

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Audio is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Audio is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents a document of any kind.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Document is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Document is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents an audio document of any kind.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Event is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Event is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents any kind of event.

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Image is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Image is an implementation of
* one of the Activity Streams Extended Types.
*
* An image document of any kind.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Link;
use Plugin\ActivityPub\Util\Type\Core\Link;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Mention is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Mention is an implementation of
* one of the Activity Streams Extended Types.
*
* A specialized Link that represents an @mention.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Note is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Note is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents a short written work typically less than a single

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Page is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Page is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents a Web Page.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Place is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Place is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents a logical or physical location.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Profile is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Profile is an implementation of
* one of the Activity Streams Extended Types.
*
* A Profile is a content object that describes another Object,

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Tombstone is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Tombstone is an implementation of
* one of the Activity Streams Extended Types.
*
* A Tombstone represents a content object that has been deleted. It can

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Extended\Object;
namespace Plugin\ActivityPub\Util\Type\Extended\Object;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Video is an implementation of
* \Plugin\ActivityPub\Util\Type\Extended\Object\Video is an implementation of
* one of the Activity Streams Extended Types.
*
* Represents a video document of any kind.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type;
namespace Plugin\ActivityPub\Util\Type;
use Exception;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\TypeResolver is an abstract class for
* \Plugin\ActivityPub\Util\Type\TypeResolver is an abstract class for
* resolving class names called by their short names (AS types).
*/
abstract class TypeResolver

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type;
namespace Plugin\ActivityPub\Util\Type;
use DateInterval;
use DateTime;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type;
use Plugin\ActivityPub\Util\Type;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Util is an abstract class for
* \Plugin\ActivityPub\Util\Type\Util is an abstract class for
* supporting validators checks & transformations.
*/
abstract class Util

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type;
namespace Plugin\ActivityPub\Util\Type;
use Exception;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator is an abstract class for
* \Plugin\ActivityPub\Util\Type\Validator is an abstract class for
* attribute validation.
*/
abstract class Validator
@ -58,7 +58,7 @@ abstract class Validator
// Try to load a default validator
$validatorName = sprintf(
'\Plugin\ActivityStreamsTwo\Util\Type\Validator\%sValidator',
'\Plugin\ActivityPub\Util\Type\Validator\%sValidator',
ucfirst($name)
);
@ -79,7 +79,7 @@ abstract class Validator
* @param object|string $class A validator class name
*
* @throws Exception if validator class does not implement
* \Plugin\ActivityStreamsTwo\Util\Type\Helper\ValidatorInterface
* \Plugin\ActivityPub\Util\Type\Helper\ValidatorInterface
*/
public static function add(string $name, object|string $class): void
{

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\AccuracyValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\AccuracyValidator is a dedicated
* validator for accuracy attribute.
*/
class AccuracyValidator implements ValidatorInterface

View File

@ -9,17 +9,17 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Collection;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Link;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\AbstractActor;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\Collection;
use Plugin\ActivityPub\Util\Type\Core\Link;
use Plugin\ActivityPub\Util\Type\Extended\AbstractActor;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\ActorValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\ActorValidator is a dedicated
* validator for actor attribute.
*/
class ActorValidator implements ValidatorInterface

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\AltitudeValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\AltitudeValidator is a dedicated
* validator for altitude attribute.
*/
class AltitudeValidator implements ValidatorInterface

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Question;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorTools;
use Plugin\ActivityPub\Util\Type\Extended\Activity\Question;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorTools;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\AnyOfValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\AnyOfValidator is a dedicated
* validator for anyOf attribute.
*/
class AnyOfValidator extends ValidatorTools

View File

@ -9,13 +9,13 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorTools;
use Plugin\ActivityPub\Util\Type\ValidatorTools;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\AttachmentValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\AttachmentValidator is a dedicated
* validator for attachment attribute.
*/
class AttachmentValidator extends ValidatorTools

View File

@ -9,13 +9,13 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorTools;
use Plugin\ActivityPub\Util\Type\ValidatorTools;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\AttributedToValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\AttributedToValidator is a dedicated
* validator for attributedTo attribute.
*/
class AttributedToValidator extends ValidatorTools

View File

@ -9,13 +9,13 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorTools;
use Plugin\ActivityPub\Util\Type\ValidatorTools;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\AudienceValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\AudienceValidator is a dedicated
* validator for audience attribute.
*/
class AudienceValidator extends ValidatorTools

View File

@ -9,13 +9,13 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorTools;
use Plugin\ActivityPub\Util\Type\ValidatorTools;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\BccValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\BccValidator is a dedicated
* validator for bcc attribute.
*/
class BccValidator extends ValidatorTools

View File

@ -9,13 +9,13 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorTools;
use Plugin\ActivityPub\Util\Type\ValidatorTools;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\BtoValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\BtoValidator is a dedicated
* validator for bto attribute.
*/
class BtoValidator extends ValidatorTools

View File

@ -9,13 +9,13 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorTools;
use Plugin\ActivityPub\Util\Type\ValidatorTools;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\CcValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\CcValidator is a dedicated
* validator for cc attribute.
*/
class CcValidator extends ValidatorTools

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\Activity\Question;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Extended\Activity\Question;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\ClosedValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\ClosedValidator is a dedicated
* validator for closed attribute.
*/
class ClosedValidator implements ValidatorInterface

View File

@ -9,13 +9,13 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorTools;
use Plugin\ActivityPub\Util\Type\ValidatorTools;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\ContentMapValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\ContentMapValidator is a dedicated
* validator for contentMap attribute.
*/
class ContentMapValidator extends ValidatorTools

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\ContentValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\ContentValidator is a dedicated
* validator for content attribute.
*/
class ContentValidator implements ValidatorInterface

View File

@ -9,14 +9,14 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\ContextValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\ContextValidator is a dedicated
* validator for context attribute.
*/
class ContextValidator implements ValidatorInterface

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Collection;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\Collection;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\CurrentValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\CurrentValidator is a dedicated
* validator for current attribute.
*/
class CurrentValidator implements ValidatorInterface

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Tombstone;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Extended\Object\Tombstone;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\DeletedValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\DeletedValidator is a dedicated
* validator for deleted attribute.
*/
class DeletedValidator implements ValidatorInterface

View File

@ -9,16 +9,16 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Profile;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Extended\Object\Profile;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\DescribesValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\DescribesValidator is a dedicated
* validator for describes attribute.
*/
class DescribesValidator implements ValidatorInterface

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\DurationValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\DurationValidator is a dedicated
* validator for duration attribute.
*/
class DurationValidator implements ValidatorInterface

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\EndTimeValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\EndTimeValidator is a dedicated
* validator for endTime attribute.
*/
class EndTimeValidator implements ValidatorInterface

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\AbstractActor;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Extended\AbstractActor;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\EndpointsValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\EndpointsValidator is a dedicated
* validator for endpoints attribute.
*/
class EndpointsValidator implements ValidatorInterface

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\FirstValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\FirstValidator is a dedicated
* validator for first attribute.
*/
class FirstValidator extends CurrentValidator

View File

@ -9,17 +9,17 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Collection;
use Plugin\ActivityStreamsTwo\Util\Type\Core\OrderedCollection;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\AbstractActor;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\Collection;
use Plugin\ActivityPub\Util\Type\Core\OrderedCollection;
use Plugin\ActivityPub\Util\Type\Extended\AbstractActor;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\FollowersValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\FollowersValidator is a dedicated
* validator for followers attribute.
*/
class FollowersValidator implements ValidatorInterface

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\FollowingValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\FollowingValidator is a dedicated
* validator for followers attribute.
*/
class FollowingValidator extends FollowersValidator

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Tombstone;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Extended\Object\Tombstone;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\FormerTypeValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\FormerTypeValidator is a dedicated
* validator for formerType attribute.
*/
class FormerTypeValidator implements ValidatorInterface

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\GeneratorValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\GeneratorValidator is a dedicated
* validator for generator attribute.
*/
class GeneratorValidator implements ValidatorInterface

View File

@ -9,16 +9,16 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Link;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Image;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\Link;
use Plugin\ActivityPub\Util\Type\Extended\Object\Image;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\HeightValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\HeightValidator is a dedicated
* validator for height attribute.
*/
class HeightValidator implements ValidatorInterface

View File

@ -9,16 +9,16 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Link;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\Link;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\HrefValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\HrefValidator is a dedicated
* validator for href attribute.
*/
class HrefValidator implements ValidatorInterface

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Link;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\Link;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\HreflangValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\HreflangValidator is a dedicated
* validator for hreflang attribute.
*/
class HreflangValidator implements ValidatorInterface

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\IconValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\IconValidator is a dedicated
* validator for icon attribute.
*/
class IconValidator implements ValidatorInterface

View File

@ -9,13 +9,13 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\IdValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\IdValidator is a dedicated
* validator for id attribute.
*/
class IdValidator implements ValidatorInterface

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\ImageValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\ImageValidator is a dedicated
* validator for image attribute.
*/
class ImageValidator extends IconValidator

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\ObjectType;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\ObjectType;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\InReplyToValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\InReplyToValidator is a dedicated
* validator for inReplyTo attribute.
*/
class InReplyToValidator implements ValidatorInterface

View File

@ -9,17 +9,17 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\OrderedCollection;
use Plugin\ActivityStreamsTwo\Util\Type\Core\OrderedCollectionPage;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\AbstractActor;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Core\OrderedCollection;
use Plugin\ActivityPub\Util\Type\Core\OrderedCollectionPage;
use Plugin\ActivityPub\Util\Type\Extended\AbstractActor;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\InboxValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\InboxValidator is a dedicated
* validator for inbox attribute.
*/
class InboxValidator implements ValidatorInterface

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\InstrumentValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\InstrumentValidator is a dedicated
* validator for instrument attribute.
*/
class InstrumentValidator extends ActorValidator

View File

@ -9,16 +9,16 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Collection;
use Plugin\ActivityStreamsTwo\Util\Type\Core\Link;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorTools;
use Plugin\ActivityPub\Util\Type\Core\Collection;
use Plugin\ActivityPub\Util\Type\Core\Link;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorTools;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\ItemsValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\ItemsValidator is a dedicated
* validator for items attribute.
*/
class ItemsValidator extends ValidatorTools

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\LastValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\LastValidator is a dedicated
* validator for last attribute.
*/
class LastValidator extends CurrentValidator

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/
namespace Plugin\ActivityStreamsTwo\Util\Type\Validator;
namespace Plugin\ActivityPub\Util\Type\Validator;
use Exception;
use Plugin\ActivityStreamsTwo\Util\Type\Extended\Object\Place;
use Plugin\ActivityStreamsTwo\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface;
use Plugin\ActivityPub\Util\Type\Extended\Object\Place;
use Plugin\ActivityPub\Util\Type\Util;
use Plugin\ActivityPub\Util\Type\ValidatorInterface;
/**
* \Plugin\ActivityStreamsTwo\Util\Type\Validator\LatitudeValidator is a dedicated
* \Plugin\ActivityPub\Util\Type\Validator\LatitudeValidator is a dedicated
* validator for latitude attribute.
*/
class LatitudeValidator implements ValidatorInterface

Some files were not shown because too many files have changed in this diff Show More