[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\Event;
use App\Core\Modules\Plugin; use App\Core\Modules\Plugin;
use App\Core\Router\RouteLoader; use App\Core\Router\RouteLoader;
use App\Core\Router\Router;
use Exception; use Exception;
use Plugin\ActivityPub\Controller\Inbox; 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 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 * 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. * @param RouteLoader $r the router that was initialized.
* *
@ -30,19 +33,19 @@ class ActivityPub extends Plugin
'activitypub_actor_inbox', 'activitypub_actor_inbox',
'/actor/{gsactor_id<\d+>}/inbox.json', '/actor/{gsactor_id<\d+>}/inbox.json',
[Inbox::class, 'handle'], [Inbox::class, 'handle'],
options: ['accept' => ActivityStreamsTwo::$accept_headers] options: ['accept' => self::$accept_headers]
); );
$r->connect( $r->connect(
'activitypub_actor_outbox', 'activitypub_actor_outbox',
'/actor/{gsactor_id<\d+>}/outbox.json', '/actor/{gsactor_id<\d+>}/outbox.json',
[Inbox::class, 'handle'], [Inbox::class, 'handle'],
options: ['accept' => ActivityStreamsTwo::$accept_headers] options: ['accept' => self::$accept_headers]
); );
$r->connect( $r->connect(
'activitypub_inbox', 'activitypub_inbox',
'/inbox.json', '/inbox.json',
[Inbox::class, 'handle'], [Inbox::class, 'handle'],
options: ['accept' => ActivityStreamsTwo::$accept_headers] options: ['accept' => self::$accept_headers]
); );
return Event::next; return Event::next;
} }
@ -53,19 +56,20 @@ class ActivityPub extends Plugin
* @param null|array|string $accept * @param null|array|string $accept
* @param bool $strict Strict mode * @param bool $strict Strict mode
* *
* @throws \Exception when strict mode enabled * @throws Exception when strict mode enabled
* *
* @return bool * @return bool
*
*/ */
public static function validateAcceptHeader(array|string|null $accept, bool $strict): bool public static function validateAcceptHeader(array|string|null $accept, bool $strict): bool
{ {
if (is_string($accept) if (is_string($accept)
&& in_array($accept, ActivityStreamsTwo::$accept_headers) && in_array($accept, self::$accept_headers)
) { ) {
return true; return true;
} elseif (is_array($accept) } elseif (is_array($accept)
&& count( && count(
array_intersect($accept, ActivityStreamsTwo::$accept_headers) array_intersect($accept, self::$accept_headers)
) > 0 ) > 0
) { ) {
return true; 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 function App\Core\I18n\_m;
use App\Util\Exception\ClientException; use App\Util\Exception\ClientException;
use Plugin\ActivityPub\ActivityPub; use Plugin\ActivityPub\ActivityPub;
use Plugin\ActivityStreamsTwo\Util\Model\AS2ToEntity\AS2ToEntity; use Plugin\ActivityPub\Util\Model\AS2ToEntity\AS2ToEntity;
use Plugin\ActivityStreamsTwo\Util\Response\TypeResponse; use Plugin\ActivityPub\Util\Response\TypeResponse;
use Plugin\ActivityStreamsTwo\Util\Type; use Plugin\ActivityPub\Util\Type;
use Plugin\ActivityStreamsTwo\Util\Type\Util; use Plugin\ActivityPub\Util\Type\Util;
class Inbox extends Controller class Inbox extends Controller
{ {
@ -51,7 +51,7 @@ class Inbox extends Controller
true true
); );
// Check current actor can post // TODO: Check if Actor can post
// Get content // Get content
$payload = Util::decodeJson( $payload = Util::decodeJson(
@ -60,12 +60,12 @@ class Inbox extends Controller
// Cast as an ActivityStreams type // Cast as an ActivityStreams type
$type = Type::create($payload); $type = Type::create($payload);
dd(AS2ToEntity::translate(activity: $type->toArray()['object'], source: 'ActivityPub'));
// $http_signature = new HttpSignature($this->server); // TODO: Check if Actor has authority over payload
// if ($http_signature->verify($request)) {
// return new Response('', 201); // Store Activity
// } dd(AS2ToEntity::store(activity: $type->toArray(), source: 'ActivityPub'));
DB::flush();
return new TypeResponse($type, status: 202); 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\DB\DB;
use App\Core\Entity; use App\Core\Entity;
@ -32,21 +32,25 @@ use DateTimeInterface;
* @package GNUsocial * @package GNUsocial
* *
* @author Hugo Sales <hugo@hsal.es> * @author Hugo Sales <hugo@hsal.es>
* @author Diogo Peralta Cordeiro <mail@diogo.site>
* @copyright 2020-2021 Free Software Foundation, Inc http://www.fsf.org * @copyright 2020-2021 Free Software Foundation, Inc http://www.fsf.org
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
class Activity extends Entity class ActivitypubActivity extends Entity
{ {
// {{{ Autocode // {{{ Autocode
// @codeCoverageIgnoreStart // @codeCoverageIgnoreStart
private int $id; private int $id;
private string $activity_uri;
private int $actor_id; private int $actor_id;
private string $verb; private string $verb;
private string $object_type; private string $object_type;
private int $object_id; private int $object_id;
private string $object_uri;
private bool $is_local; private bool $is_local;
private ?string $source; private ?string $source;
private \DateTimeInterface $created; private \DateTimeInterface $created;
private \DateTimeInterface $modified;
public function setId(int $id): self public function setId(int $id): self
{ {
@ -59,6 +63,17 @@ class Activity extends Entity
return $this->id; 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 public function setActorId(int $actor_id): self
{ {
$this->actor_id = $actor_id; $this->actor_id = $actor_id;
@ -103,6 +118,17 @@ class Activity extends Entity
return $this->object_id; 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 public function setIsLocal(bool $is_local): self
{ {
$this->is_local = $is_local; $this->is_local = $is_local;
@ -136,24 +162,42 @@ class Activity extends Entity
return $this->created; return $this->created;
} }
public function setModified(DateTimeInterface $modified): self
{
$this->modified = $modified;
return $this;
}
public function getModified(): DateTimeInterface
{
return $this->modified;
}
// @codeCoverageIgnoreEnd // @codeCoverageIgnoreEnd
// }}} Autocode // }}} Autocode
public static function schemaDef(): array public static function schemaDef(): array
{ {
return [ return [
'name' => 'activity', 'name' => 'activitypub_activity',
'fields' => [ 'fields' => [
'id' => ['type' => 'serial', 'not null' => true], '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'],
'verb' => ['type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'internal activity verb, influenced by activity pub verbs'], 'actor_id' => ['type' => 'int', 'foreign key' => true, 'target' => 'Actor.id', 'multiplicity' => 'one to one', 'not null' => true, 'description' => 'who made the note'],
'object_type' => ['type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'the name of the table this object refers to'], 'verb' => ['type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'internal activity verb, influenced by activity pub verbs'],
'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'],
'is_local' => ['type' => 'bool', 'not null' => true, 'description' => 'whether this was a locally generated or an imported activity'], 'object_id' => ['type' => 'int', 'description' => 'id in the referenced table'],
'source' => ['type' => 'varchar', 'length' => 32, 'description' => 'the source of this activity'], 'object_uri' => ['type' => 'text', 'not null' => true, 'description' => 'Object\'s URI'],
'created' => ['type' => 'datetime', 'not null' => true, 'description' => 'date this record was created', 'default' => 'CURRENT_TIMESTAMP'], '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, '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'], '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 <?php
namespace Plugin\ActivityStreamsTwo\Util\Model\AS2ToEntity; namespace Plugin\ActivityPub\Util\Model\AS2ToEntity;
use App\Core\Event; use App\Core\Event;
use App\Entity\Actor; use App\Entity\Actor;
@ -33,7 +33,7 @@ abstract class AS2ToGSActor
$map['content'], $map['content'],
$map['content_type'], $map['content_type'],
&$map['rendered'], &$map['rendered'],
Actor::getFromId(1), // just for testing Actor::getById(1), // just for testing
null, // reply to 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 <?php
namespace Plugin\ActivityStreamsTwo\Util\Model\EntityToType; namespace Plugin\ActivityPub\Util\Model\EntityToType;
use App\Core\Entity; use App\Core\Entity;
use Plugin\ActivityStreamsTwo\Util\Type; use Plugin\ActivityPub\Util\Type;
abstract class EntityToType abstract class EntityToType
{ {

View File

@ -1,14 +1,15 @@
<?php <?php
namespace Plugin\ActivityStreamsTwo\Util\Model\EntityToType; namespace Plugin\ActivityPub\Util\Model\EntityToType;
use App\Core\Event;
use App\Core\Router\Router; use App\Core\Router\Router;
use App\Entity\Actor; use App\Entity\Actor;
use Component\Avatar\Avatar; use Component\Avatar\Avatar;
use Component\Avatar\Exception\NoAvatarException; use Component\Avatar\Exception\NoAvatarException;
use DateTimeInterface; use DateTimeInterface;
use Exception; use Exception;
use Plugin\ActivityStreamsTwo\Util\Type; use Plugin\ActivityPub\Util\Type;
class GSActorToType class GSActorToType
{ {
@ -22,7 +23,8 @@ class GSActorToType
*/ */
public static function translate(Actor $gsactor) 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 = [ $attr = [
'@context' => 'https://www.w3.org/ns/activitystreams', '@context' => 'https://www.w3.org/ns/activitystreams',
'id' => $uri, 'id' => $uri,

View File

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

View File

@ -1,8 +1,8 @@
<?php <?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 abstract class AbstractResponse
{ {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * attributes between Activity and IntransitiveActivity.
* *
* It SHOULD NOT be used as if. * 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 * @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-actor
* *
* @var string * @var string
* | \Plugin\ActivityStreamsTwo\Util\Type\Extended\AbstractActor * | \Plugin\ActivityPub\Util\Type\Extended\AbstractActor
* | array<Actor> * | array<Actor>
* | array<Link> * | array<Link>
* | Link * | Link

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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 Streams Core Types.
* *
* Activity objects are specializations of the base Object type that * Activity objects are specializations of the base Object type that

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * Activity Streams Core Types.
* *
* Collection objects are a specialization of the base Object that serve * 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>. * <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 * CollectionPage is an implementation of one

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Core Types.
* *
* IntransitiveActivity objects are specializations of the Activity type * IntransitiveActivity objects are specializations of the Activity type

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * Activity Streams Core Types.
* *
* A Link describes a qualified, indirect reference to another resource. * A Link describes a qualified, indirect reference to another resource.

View File

@ -9,9 +9,9 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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 * ObjectType is an implementation of one of the

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * of the Activity Streams Core Types.
* *
* A subtype of Collection in which members of the logical collection * 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>. * <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. * of the Activity Streams Core Types.
* *
* The OrderedCollectionPage type extends from both CollectionPage and * The OrderedCollectionPage type extends from both CollectionPage and

View File

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

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor accepts the object. The target property can * 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>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor is calling the target's attention the * 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>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor is blocking the object. Blocking is a * 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>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor has created the object. * Indicates that the actor has created the object.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor has deleted the object. If specified, the * 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>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor is "following" the object. Following is * Indicates that the actor is "following" the object. Following is

View File

@ -9,9 +9,9 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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 * \ActivityPhp\Type\Extended\Activity\Ignore is an implementation of

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor has joined the object. * Indicates that the actor has joined the object.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor has left the object. * Indicates that the actor has left the object.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor likes, recommends or endorses the object. * Indicates that the actor likes, recommends or endorses the object.

View File

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

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor is rejecting the object. * Indicates that the actor is rejecting the object.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor is removing the object. * Indicates that the actor is removing the object.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor is undoing the object. In most cases, the * 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>. * <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. * one of the Activity Streams Extended Types.
* *
* Indicates that the actor has updated the object. Note, however, that * 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>. * <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. * one of the Activity Streams Extended Types.
* *
* Describes a software application. * Describes a software application.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents a formal or informal collective of Actors. * Represents a formal or informal collective of Actors.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents a formal or informal collective of Actors. * Represents a formal or informal collective of Actors.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents an individual person. * Represents an individual person.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents a service of any kind. * Represents a service of any kind.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents any kind of multi-paragraph written work. * Represents any kind of multi-paragraph written work.

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents a document of any kind. * Represents a document of any kind.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents an audio document of any kind. * Represents an audio document of any kind.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents any kind of event. * Represents any kind of event.

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* An image document of any kind. * An image document of any kind.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* A specialized Link that represents an @mention. * A specialized Link that represents an @mention.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents a short written work typically less than a single * Represents a short written work typically less than a single

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents a Web Page. * Represents a Web Page.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents a logical or physical location. * Represents a logical or physical location.

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* A Profile is a content object that describes another Object, * A Profile is a content object that describes another Object,

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * one of the Activity Streams Extended Types.
* *
* A Tombstone represents a content object that has been deleted. It can * 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>. * <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. * one of the Activity Streams Extended Types.
* *
* Represents a video document of any kind. * Represents a video document of any kind.

View File

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

View File

@ -9,15 +9,15 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <https://github.com/landrok/activitypub/blob/master/LICENSE>.
*/ */
namespace Plugin\ActivityStreamsTwo\Util\Type; namespace Plugin\ActivityPub\Util\Type;
use DateInterval; use DateInterval;
use DateTime; use DateTime;
use Exception; 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. * supporting validators checks & transformations.
*/ */
abstract class Util abstract class Util
@ -379,7 +379,7 @@ abstract class Util
is_null($min) && is_null($max) => false, is_null($min) && is_null($max) => false,
is_null($min) => $value <= $max, is_null($min) => $value <= $max,
is_null($max) => $value >= $min, is_null($max) => $value >= $min,
default => $value >= $min default => $value >= $min
&& $value <= $max, && $value <= $max,
}; };
} }

View File

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

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * validator for accuracy attribute.
*/ */
class AccuracyValidator implements ValidatorInterface class AccuracyValidator implements ValidatorInterface

View File

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

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * validator for altitude attribute.
*/ */
class AltitudeValidator implements ValidatorInterface class AltitudeValidator implements ValidatorInterface

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,12 +9,12 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * validator for content attribute.
*/ */
class ContentValidator implements ValidatorInterface class ContentValidator implements ValidatorInterface

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * validator for first attribute.
*/ */
class FirstValidator extends CurrentValidator class FirstValidator extends CurrentValidator

View File

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

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * validator for followers attribute.
*/ */
class FollowingValidator extends FollowersValidator class FollowingValidator extends FollowersValidator

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,13 +9,13 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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\ActivityPub\Util\Type\Util;
use Plugin\ActivityStreamsTwo\Util\Type\ValidatorInterface; 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. * validator for id attribute.
*/ */
class IdValidator implements ValidatorInterface class IdValidator implements ValidatorInterface

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * validator for image attribute.
*/ */
class ImageValidator extends IconValidator class ImageValidator extends IconValidator

View File

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

View File

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

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * validator for instrument attribute.
*/ */
class InstrumentValidator extends ActorValidator class InstrumentValidator extends ActorValidator

View File

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

View File

@ -9,10 +9,10 @@
* <https://github.com/landrok/activitypub/blob/master/LICENSE>. * <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. * validator for last attribute.
*/ */
class LastValidator extends CurrentValidator class LastValidator extends CurrentValidator

View File

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

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