2020-09-07 18:24:11 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2023-01-01 09:36:24 -05:00
|
|
|
* @copyright Copyright (C) 2010-2023, the Friendica project
|
2020-09-07 18:24:11 +00:00
|
|
|
*
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Friendica\Object\Api\Mastodon\Status;
|
|
|
|
|
|
|
|
/**
|
2020-09-08 01:44:49 +00:00
|
|
|
* Class Counts
|
2020-09-07 18:24:11 +00:00
|
|
|
*
|
|
|
|
* @see https://docs.joinmastodon.org/entities/status
|
|
|
|
*/
|
2020-09-08 03:39:51 +02:00
|
|
|
class Counts
|
2020-09-07 18:24:11 +00:00
|
|
|
{
|
|
|
|
/** @var int */
|
|
|
|
protected $replies;
|
|
|
|
/** @var int */
|
2020-09-08 01:45:59 +00:00
|
|
|
protected $reblogs;
|
2020-09-07 18:24:11 +00:00
|
|
|
/** @var int */
|
|
|
|
protected $favourites;
|
|
|
|
|
2023-02-20 15:31:15 -05:00
|
|
|
/** @var int */
|
|
|
|
protected $dislikes;
|
|
|
|
|
2020-09-07 18:24:11 +00:00
|
|
|
/**
|
|
|
|
* Creates a status count object
|
|
|
|
*
|
|
|
|
* @param int $replies
|
|
|
|
* @param int $reblogs
|
|
|
|
* @param int $favourites
|
|
|
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
|
|
|
*/
|
2023-02-20 15:31:15 -05:00
|
|
|
public function __construct(int $replies, int $reblogs, int $favourites, int $dislikes)
|
2020-09-07 18:24:11 +00:00
|
|
|
{
|
2023-02-20 15:31:15 -05:00
|
|
|
$this->replies = $replies;
|
|
|
|
$this->reblogs = $reblogs;
|
2020-09-07 18:24:11 +00:00
|
|
|
$this->favourites = $favourites;
|
2023-02-20 15:31:15 -05:00
|
|
|
$this->dislikes = $dislikes;
|
2020-09-07 18:24:11 +00:00
|
|
|
}
|
|
|
|
|
2023-02-20 15:31:15 -05:00
|
|
|
public function __get($name)
|
|
|
|
{
|
2020-10-25 16:26:47 +00:00
|
|
|
return $this->$name;
|
|
|
|
}
|
2020-09-07 18:24:11 +00:00
|
|
|
}
|