<?php

namespace GemBoards\utils\traits;

use Exception;
use GemBoards\Classes\Exception\GemboardsException;
use GemBoards\Entities\NotifiedUser;

trait Notification {

	public static function get_notification( int $id ) {
		try {
			return new \GemBoards\Entities\Notification( $id );
		} catch ( GemBoardsException | Exception $e ) {
			return false;
		}
	}

	public static function get_notified_user( int $id ) {
		try {
			return new NotifiedUser( $id );
		} catch ( GemBoardsException | Exception $e ) {
			return false;
		}
	}
}
