PHP 클래스 Fenos\Notifynder\Notifications\NotificationManager

The notification manager is responsable to manage the CRUD operations of the notifications.
상속: implements Fenos\Notifynder\Contracts\NotifynderNotification
파일 보기 프로젝트 열기: fenos/notifynder 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$entity string | null | null
$notifynderRepo Fenos\Notifynder\Contracts\NotificationDB

공개 메소드들

메소드 설명
__construct ( Fenos\Notifynder\Contracts\NotificationDB $notifynderRepo )
countNotRead ( $toId, Closur\Closure $filterScope = null ) : mixed Get number of notification not read.
delete ( $notificationId ) : boolean Delete a notification giving the id of it.
deleteAll ( $entityId ) : boolean Delete all notification of a given Entity.
deleteByCategory ( $categoryName, $expired = false ) : boolean Delete All notifications from a defined category.
deleteLimit ( $entityId, $number, $order = 'asc' ) : mixed Delete numbers of notifications equals to the number passing as 2 parameter of the current user.
entity ( $name ) Set the entity for polymorphic.
find ( $notificationId ) : Notification | Model | static Find a notification by ID.
getAll ( $toId, $limit = null, integer | null $paginate = null, string $orderDate = 'desc', Closur\Closure $filterScope = null ) : mixed Get All notifications.
getLastNotification ( $toId, Closur\Closure $filterScope = null ) : mixed Get last notification of the given entity.
getLastNotificationByCategory ( $category, $toId, Closur\Closure $filterScope = null ) : mixed Get last notification of the given entity of the specific category.
getNotRead ( $toId, $limit = null, integer | null $paginate = null, string $orderDate = 'desc', Closur\Closure $filterScope = null ) : mixed Get notifications not read of the entity given.
readAll ( $toId ) : Number Read all notification of the given entity.
readLimit ( $toId, $numbers, string $order = 'ASC' ) : mixed Read notifications in base the number Given.
readOne ( $notificationId ) : boolean | Notification Make read one notification giving the ID of it.
sendMultiple ( array $info ) : mixed Send multiple notifications.
sendOne ( array $info ) : static Send single notification.

보호된 메소드들

메소드 설명
getPaginatedIfNeeded ( NotifynderCollection $notifications, $perPage, $paginate )
isPaginated ( $paginate )

메소드 상세

__construct() 공개 메소드

public __construct ( Fenos\Notifynder\Contracts\NotificationDB $notifynderRepo )
$notifynderRepo Fenos\Notifynder\Contracts\NotificationDB

countNotRead() 공개 메소드

Get number of notification not read.
public countNotRead ( $toId, Closur\Closure $filterScope = null ) : mixed
$toId
$filterScope Closur\Closure
리턴 mixed

delete() 공개 메소드

Delete a notification giving the id of it.
public delete ( $notificationId ) : boolean
$notificationId
리턴 boolean

deleteAll() 공개 메소드

Delete all notification of a given Entity.
public deleteAll ( $entityId ) : boolean
$entityId
리턴 boolean

deleteByCategory() 공개 메소드

Delete All notifications from a defined category.
public deleteByCategory ( $categoryName, $expired = false ) : boolean
$categoryName string
$expired Bool
리턴 boolean

deleteLimit() 공개 메소드

Delete numbers of notifications equals to the number passing as 2 parameter of the current user.
public deleteLimit ( $entityId, $number, $order = 'asc' ) : mixed
$entityId
$number
$order
리턴 mixed

entity() 공개 메소드

Set the entity for polymorphic.
public entity ( $name )
$name

find() 공개 메소드

Find a notification by ID.
public find ( $notificationId ) : Notification | Model | static
$notificationId
리턴 Fenos\Notifynder\Models\Notification | Illuminate\Database\Eloquent\Model | static

getAll() 공개 메소드

Get All notifications.
public getAll ( $toId, $limit = null, integer | null $paginate = null, string $orderDate = 'desc', Closur\Closure $filterScope = null ) : mixed
$toId
$limit
$paginate integer | null
$orderDate string
$filterScope Closur\Closure
리턴 mixed

getLastNotification() 공개 메소드

Get last notification of the given entity.
public getLastNotification ( $toId, Closur\Closure $filterScope = null ) : mixed
$toId
$filterScope Closur\Closure
리턴 mixed

getLastNotificationByCategory() 공개 메소드

Get last notification of the given entity of the specific category.
public getLastNotificationByCategory ( $category, $toId, Closur\Closure $filterScope = null ) : mixed
$category
$toId
$filterScope Closur\Closure
리턴 mixed

getNotRead() 공개 메소드

Get notifications not read of the entity given.
public getNotRead ( $toId, $limit = null, integer | null $paginate = null, string $orderDate = 'desc', Closur\Closure $filterScope = null ) : mixed
$toId
$limit
$paginate integer | null
$orderDate string
$filterScope Closur\Closure
리턴 mixed

getPaginatedIfNeeded() 보호된 메소드

protected getPaginatedIfNeeded ( NotifynderCollection $notifications, $perPage, $paginate )
$notifications Fenos\Notifynder\Models\NotifynderCollection

isPaginated() 보호된 메소드

protected isPaginated ( $paginate )

readAll() 공개 메소드

Read all notification of the given entity.
public readAll ( $toId ) : Number
$toId
리턴 Number

readLimit() 공개 메소드

Read notifications in base the number Given.
public readLimit ( $toId, $numbers, string $order = 'ASC' ) : mixed
$toId
$numbers
$order string
리턴 mixed

readOne() 공개 메소드

Make read one notification giving the ID of it.
public readOne ( $notificationId ) : boolean | Notification
$notificationId
리턴 boolean | Fenos\Notifynder\Models\Notification

sendMultiple() 공개 메소드

Send multiple notifications.
public sendMultiple ( array $info ) : mixed
$info array
리턴 mixed

sendOne() 공개 메소드

Send single notification.
public sendOne ( array $info ) : static
$info array
리턴 static

프로퍼티 상세

$entity 보호되어 있는 프로퍼티

| null
protected string|null $entity
리턴 string | null

$notifynderRepo 보호되어 있는 프로퍼티

protected NotificationDB,Fenos\Notifynder\Contracts $notifynderRepo
리턴 Fenos\Notifynder\Contracts\NotificationDB