Check out the following class:
class FireBreathingAccident
{
public string $description;
private \DateTime $breathedAt;
private int $humansInjured;
public function __construct(string $description, \DateTime $breathedAt)
{
$this->description = $description;
$this->breathedAt = $breathedAt;
}
public function setHumansInjured(int $count)
{
$this->humansInjured = $humansInjured;
}
public function getHumansInjured(): int
{
return $this->humansInjured;
}
public function getMoodOfHumansAfter(): string
{
return 'a bit mad';
}
}
What fields would be returned in the API for this class?