activitypub/src/ContentNation/ActivityPub/Common/Outbox.php

39 lines
1.0 KiB
PHP

<?php
namespace ContentNation\ActivityPub\Common;
require_once("OrderedCollectionPage.php");
class Outbox extends OrderedCollectionPage {
public function __construct() {
parent::__construct();
parent::addContext('https://www.w3.org/ns/activitystreams');
parent::addContext(array(
"ostatus" => "http://ostatus.org#",
"atomUri" => "ostatus:atomUri",
"inReplyToAtomUri" => "ostatus:inReplyToAtomUri",
"conversation" => "ostatus:conversation",
"sensitive" => "as:sensitive",
"toot" => "http://joinmastodon.org/ns#",
"votersCount" => "toot:votersCount",
"Hashtag" => "as:Hashtag"
));
}
/**
* convert internal state to php array
* @return array<string,mixed>
*/
public function toObject() {
$return = parent::toObject();
return $return;
}
/**
* create object from json
* @param array<string,mixed> $json input json
* @return bool true on success
*/
public function fromJson($json) : bool {
return parent::fromJson($json);
}
}