. // }}} /** * Common utility functions * * @package GNUsocial * @category Util * * @author Hugo Sales * @copyright 2020-2021 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ namespace App\Util\Notification; use App\Entity\Actor; class Notification { public const NOTICE_BY_SUBSCRIBED = 1; public const MENTION = 2; public const REPLY = 3; public const SUBSCRIPTION = 4; public const FAVORITE = 5; public const NUDGE = 6; public const DM = 7; /** * @param int $type One of the above constants * @param Actor $actor Who caused this notification */ public function __construct(private int $type, private Actor $actor) { } public function getType(): int { return $this->type; } public function getActor(): Actor { return $this->actor; } }