2021-08-25 04:29:26 +09:00
|
|
|
<?php
|
|
|
|
|
2021-10-10 17:26:18 +09:00
|
|
|
declare(strict_types = 1);
|
|
|
|
|
2021-08-25 04:29:26 +09:00
|
|
|
/*
|
|
|
|
* This file is part of the ActivityPhp package.
|
|
|
|
*
|
|
|
|
* Copyright (c) landrok at github.com/landrok
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please see
|
|
|
|
* <https://github.com/landrok/activitypub/blob/master/LICENSE>.
|
|
|
|
*/
|
|
|
|
|
2021-10-05 01:00:58 +09:00
|
|
|
namespace Plugin\ActivityPub\Util\Type\Core;
|
2021-08-25 04:29:26 +09:00
|
|
|
|
|
|
|
/**
|
2021-10-05 01:00:58 +09:00
|
|
|
* \Plugin\ActivityPub\Util\Type\Core\Collection is an implementation of one of the
|
2021-08-25 04:29:26 +09:00
|
|
|
* Activity Streams Core Types.
|
|
|
|
*
|
|
|
|
* Collection objects are a specialization of the base Object that serve
|
|
|
|
* as a container for other Objects or Links.
|
|
|
|
*
|
|
|
|
* @see https://www.w3.org/TR/activitystreams-core/#collections
|
|
|
|
*/
|
|
|
|
class Collection extends ObjectType
|
|
|
|
{
|
|
|
|
protected string $type = 'Collection';
|
|
|
|
|
2021-09-07 07:47:28 +09:00
|
|
|
public string $id;
|
2021-08-25 04:29:26 +09:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A non-negative integer specifying the total number of objects
|
|
|
|
* contained by the logical view of the collection.
|
|
|
|
* This number might not reflect the actual number of items
|
|
|
|
* serialized within the Collection object instance.
|
|
|
|
*
|
|
|
|
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-totalitems
|
|
|
|
*/
|
|
|
|
protected int $totalItems;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* In a paged Collection, indicates the page that contains the most
|
|
|
|
* recently updated member items.
|
|
|
|
*
|
|
|
|
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-current
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
* | Link
|
|
|
|
* | CollectionPage
|
|
|
|
* | null
|
|
|
|
*/
|
|
|
|
protected string $current;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The furthest preceding page of items in the collection.
|
|
|
|
*
|
|
|
|
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-last
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
* | Link
|
|
|
|
* | CollectionPage
|
|
|
|
* | null
|
|
|
|
*/
|
|
|
|
protected string $first;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The furthest proceeding page of the collection.
|
|
|
|
*
|
|
|
|
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-last
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
* | Link
|
|
|
|
* | CollectionPage
|
|
|
|
* | null
|
|
|
|
*/
|
|
|
|
protected string $last;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The items contained in a collection.
|
|
|
|
* The items are considered as unordered.
|
|
|
|
*
|
|
|
|
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-items
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
* | Link
|
|
|
|
* | array<Link>
|
|
|
|
* | array<ObjectType>
|
|
|
|
*/
|
|
|
|
protected array $items = [];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The items contained in a collection.
|
|
|
|
* The items are considered as ordered.
|
|
|
|
*
|
|
|
|
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-items
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
* | Link
|
|
|
|
* | array<Link>
|
|
|
|
* | array<ObjectType>
|
|
|
|
*/
|
|
|
|
protected array $orderedItems = [];
|
|
|
|
}
|