Improve notification classes and move interface to core

This commit is contained in:
Frederic Guillot
2016-05-28 17:36:55 -04:00
parent 88ee691bb9
commit d6c1c1ea33
8 changed files with 25 additions and 21 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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