Files
exchange-2.0/app/Classes/Modules/Notifications/Processors/CreateNotificationProcessor.php
2022-04-16 23:53:12 +08:00

28 lines
756 B
PHP

<?php
namespace App\Classes\Modules\Notifications\Processors;
use App\Classes\Modules\Notifications\DataTransferObjects\NotificationObject;
use App\Classes\Modules\Notifications\Services\CreatesNotification;
class CreateNotificationProcessor
{
/** @var CreatesNotification */
private $createsNotification;
/**
* CreateNotificationProcessor constructor.
* @param CreatesNotification $createsNotification
*/
public function __construct(CreatesNotification $createsNotification)
{
$this->createsNotification = $createsNotification;
}
public function execute(NotificationObject $object)
{
$notification = $this->createsNotification->execute($object);
return $notification;
}
}