Improve notification classes and move interface to core
This commit is contained in:
@@ -3,14 +3,15 @@
|
||||
namespace Kanboard\Notification;
|
||||
|
||||
use Kanboard\Core\Base;
|
||||
use Kanboard\Core\Notification\NotificationInterface;
|
||||
|
||||
/**
|
||||
* Activity Stream Notification
|
||||
*
|
||||
* @package notification
|
||||
* @package Kanboard\Notification
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
class ActivityStream extends Base implements NotificationInterface
|
||||
class ActivityStreamNotification extends Base implements NotificationInterface
|
||||
{
|
||||
/**
|
||||
* Send notification to a user
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Kanboard\Notification;
|
||||
|
||||
use Kanboard\Core\Base;
|
||||
use Kanboard\Core\Notification\NotificationInterface;
|
||||
use Kanboard\Model\Task;
|
||||
use Kanboard\Model\TaskFile;
|
||||
use Kanboard\Model\Comment;
|
||||
@@ -11,10 +12,10 @@ use Kanboard\Model\Subtask;
|
||||
/**
|
||||
* Email Notification
|
||||
*
|
||||
* @package notification
|
||||
* @package Kanboard\Notification
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
class Mail extends Base implements NotificationInterface
|
||||
class MailNotification extends Base implements NotificationInterface
|
||||
{
|
||||
/**
|
||||
* Notification type
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Kanboard\Notification;
|
||||
|
||||
/**
|
||||
* Notification Interface
|
||||
*
|
||||
* @package core
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
interface NotificationInterface
|
||||
{
|
||||
/**
|
||||
* Send notification to a user
|
||||
*
|
||||
* @access public
|
||||
* @param array $user
|
||||
* @param string $event_name
|
||||
* @param array $event_data
|
||||
*/
|
||||
public function notifyUser(array $user, $event_name, array $event_data);
|
||||
|
||||
/**
|
||||
* Send notification to a project
|
||||
*
|
||||
* @access public
|
||||
* @param array $project
|
||||
* @param string $event_name
|
||||
* @param array $event_data
|
||||
*/
|
||||
public function notifyProject(array $project, $event_name, array $event_data);
|
||||
}
|
||||
@@ -3,14 +3,15 @@
|
||||
namespace Kanboard\Notification;
|
||||
|
||||
use Kanboard\Core\Base;
|
||||
use Kanboard\Core\Notification\NotificationInterface;
|
||||
|
||||
/**
|
||||
* Web Notification
|
||||
*
|
||||
* @package notification
|
||||
* @package Kanboard\Notification
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
class Web extends Base implements NotificationInterface
|
||||
class WebNotification extends Base implements NotificationInterface
|
||||
{
|
||||
/**
|
||||
* Notification type
|
||||
@@ -3,14 +3,15 @@
|
||||
namespace Kanboard\Notification;
|
||||
|
||||
use Kanboard\Core\Base;
|
||||
use Kanboard\Core\Notification\NotificationInterface;
|
||||
|
||||
/**
|
||||
* Webhook Notification
|
||||
*
|
||||
* @package notification
|
||||
* @package Kanboard\Notification
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
class Webhook extends Base implements NotificationInterface
|
||||
class WebhookNotification extends Base implements NotificationInterface
|
||||
{
|
||||
/**
|
||||
* Send notification to a user
|
||||
Reference in New Issue
Block a user