. * */ namespace Friendica\Protocol\ActivityPub; class FetchQueueItem { /** @var string */ private $url; /** @var array */ private $child; /** @var string */ private $relay_actor; /** @var int */ private $completion; /** * This constructor matches the signature of Processor::fetchMissingActivity except for the default $completion value * * @param string $url * @param array $child * @param string $relay_actor * @param int $completion */ public function __construct(string $url, array $child = [], string $relay_actor = '', int $completion = Receiver::COMPLETION_AUTO) { $this->url = $url; $this->child = $child; $this->relay_actor = $relay_actor; $this->completion = $completion; } /** * Array meant to be used in call_user_function_array([Processor::class, 'fetchMissingActivity']). Caller needs to * provide an instance of a FetchQueue that isn't included in these parameters. * * @see FetchQueue::process() * @return array */ public function toParameters(): array { return [$this->url, $this->child, $this->relay_actor, $this->completion]; } }