mirror of
https://github.com/flarum/core.git
synced 2025-10-17 17:56:14 +02:00
55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
/*
|
|
* This file is part of Flarum.
|
|
*
|
|
* (c) Toby Zerner <toby.zerner@gmail.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Flarum\Core\Notifications;
|
|
|
|
/**
|
|
* A notification Blueprint, when instantiated, represents a notification about
|
|
* something. The blueprint is used by the NotificationSyncer to commit the
|
|
* notification to the database.
|
|
*/
|
|
interface Blueprint
|
|
{
|
|
/**
|
|
* Get the user that sent the notification.
|
|
*
|
|
* @return \Flarum\Core\Users\User|null
|
|
*/
|
|
public function getSender();
|
|
|
|
/**
|
|
* Get the model that is the subject of this activity.
|
|
*
|
|
* @return \Flarum\Core\Model|null
|
|
*/
|
|
public function getSubject();
|
|
|
|
/**
|
|
* Get the data to be stored in the notification.
|
|
*
|
|
* @return array|null
|
|
*/
|
|
public function getData();
|
|
|
|
/**
|
|
* Get the serialized type of this activity.
|
|
*
|
|
* @return string
|
|
*/
|
|
public static function getType();
|
|
|
|
/**
|
|
* Get the name of the model class for the subject of this activity.
|
|
*
|
|
* @return string
|
|
*/
|
|
public static function getSubjectModel();
|
|
}
|