Add DDD classes for Mastodon\Field entity

This commit is contained in:
Hypolite Petovan 2020-01-23 09:04:00 -05:00
parent 5670c19d5c
commit 07a4bb73fa
4 changed files with 76 additions and 1 deletions

View file

@ -7,7 +7,7 @@ use Friendica\BaseEntity;
/**
* Class Field
*
* @see https://docs.joinmastodon.org/api/entities/#field
* @see https://docs.joinmastodon.org/entities/field/
*/
class Field extends BaseEntity
{
@ -17,4 +17,12 @@ class Field extends BaseEntity
protected $value;
/** @var string (Datetime)*/
protected $verified_at;
public function __construct(string $name, string $value)
{
$this->name = $name;
$this->value = $value;
// Link verification unsupported
$this->verified_at = null;
}
}