35 lines
713 B
PHP
35 lines
713 B
PHP
<?php
|
|
namespace ContentNation\ActivityPub\Common;
|
|
|
|
require_once("Activity.php");
|
|
|
|
class IntransitiveActivity extends Activity {
|
|
// actor | object | target | result | origin | instrument
|
|
|
|
/**
|
|
* constructor
|
|
* @param ?string $type type
|
|
*/
|
|
public function __construct($type = null) {
|
|
parent::__construct($type ?? "IntransitiveActivity");
|
|
}
|
|
|
|
/**
|
|
* create from json/array
|
|
* @param mixed $json
|
|
*/
|
|
public function fromJson($json) : bool {
|
|
return parent::fromJson($json);
|
|
}
|
|
|
|
/**
|
|
* convert internal state to php array
|
|
* @return array<string,mixed>
|
|
*/
|
|
public function toObject() {
|
|
$return = parent::toObject();
|
|
unset($return['object']);
|
|
return $return;
|
|
}
|
|
}
|