PHP 클래스 Fenos\Notifynder\NotifynderManager

Notifynder is a Facade Class that has all the methods necesessary to use the library. Notifynder allow you to have a flexible notification management. It will provide you a nice and easy API to store, retrieve and organise your notifications.
상속: extends Fenos\Notifynder\Builder\NotifynderBuilder, implements Fenos\Notifynder\Notifynder
파일 보기 프로젝트 열기: fenos/notifynder 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$categoriesContainer array
$defaultCategory Fenos\Notifynder\Models\NotificationCategory | null
$entity string | null | null
$eventSender string This sender method will be used on the dispatcher.
$notification Fenos\Notifynder\Contracts\NotifynderNotification
$notifynderCategory Fenos\Notifynder\Contracts\NotifynderCategory
$notifynderDispatcher Fenos\Notifynder\Contracts\NotifynderDispatcher
$notifynderGroup Fenos\Notifynder\Contracts\NotifynderGroup
$notifynderSender Fenos\Notifynder\Contracts\NotifynderSender

공개 메소드들

메소드 설명
__call ( $name, $arguments ) : void | mixed Call the custom sender method.
__construct ( Fenos\Notifynder\Contracts\NotifynderCategory $notifynderCategory, Fenos\Notifynder\Contracts\NotifynderSender $notifynderSender, Fenos\Notifynder\Contracts\NotifynderNotification $notification, Fenos\Notifynder\Contracts\NotifynderDispatcher $notifynderDispatcher, Fenos\Notifynder\Contracts\NotifynderGroup $notifynderGroup )
__get ( $name ) : mixed Get property from the builder.
__set ( $name, $value ) Set builder properties When setting dynamic properties.
addCategoriesToGroup ( ) : mixed Add categories to a group having as first parameter the name of the group, and others as name categories.
addCategory ( $name, $text ) : static Add a category.
addCategoryToGroupById ( $groupId, $categoryId ) : mixed Add category to a group giving the ids of them.
addCategoryToGroupByName ( $groupName, $categoryName ) : mixed Add category to a group giving the names of them.
bootListeners ( array $listeners ) Boot Listeners.
builder ( ) : NotifynderBuilder Get instance of the notifynder builder.
category ( $name ) Set the category of the notification.
countNotRead ( $toId, Closur\Closure $filterScope = null ) : mixed Get number of notification not read of the given entity.
delegate ( array $delegation, $data = [] ) : mixed Associate events to categories.
delete ( $notificationId ) : boolean Delete a single notification.
deleteAll ( $toId ) : boolean Delete all notifications of the the given entity.
deleteByCategory ( $categoryName, $expired = false ) : boolean Delete All notifications from a defined category.
deleteLimit ( $toId, $number, string $order = 'ASC' ) : mixed Delete number of notifications specified of the given entity.
dispatchWith ( $customSenderName ) Define which method the event dispatcher has to send the notifications.
entity ( $name ) Define an entity when Notifynder is used Polymorphically.
extend ( $name, callable $registrar ) Extend a custom sender method.
findNotificationById ( $notificationId ) : Illuminate\Database\Eloquent\Collection | Model | static Find Notification by ID.
fire ( string $key, string $categoryName, mixed | null $values = [] ) : mixed | null Fire method for fire listeners of logic.
getAll ( $toId, null $limit = null, integer | null $paginate = null, string $order = 'desc', Closur\Closure $filterScope = null ) : mixed Get all notifications of the given entity.
getCategoriesContainer ( $name ) : array Get the categoriesContainer property.
getLastNotification ( $toId, null $category = null, Closur\Closure $filterScope = null ) : mixed Get last notification of the given entity, second parameter can filter by category.
getNotRead ( $toId, null $limit = null, null | integer $paginate = null, string $order = 'desc', Closur\Closure $filterScope = null ) : mixed Get Notifications not read of the given entity.
id ( ) : mixed Return the Id of the category.
readAll ( $toId ) : Number Read all notifications of the given entity.
readLimit ( $toId, $numbers, string $order = 'ASC' ) : mixed Read notification in base the number Given.
readOne ( $notificationId ) : boolean | Notification Read one notification.
send ( array $info = [] ) : mixed Send notifications Both multiple and single.
sendGroup ( $groupName, $info = [] ) : mixed Send a group of notifications.
sendMultiple ( array $info = [] ) : SendMultiple Send multiple notifications.
sendNow ( array $info = [] ) : mixed Send immediately the notification even if the queue is enabled.
sendOne ( array $info = [] ) : mixed Send One notification.
updateCategory ( array $updates, $categoryId ) : mixed Update a category.

보호된 메소드들

메소드 설명
isLazyLoaded ( $name ) : boolean Check if the category is eager Loaded.
setCategoriesContainer ( $name, array $categoriesContainer ) Push a category in the categoriesContainer property.

메소드 상세

__call() 공개 메소드

Call the custom sender method.
public __call ( $name, $arguments ) : void | mixed
$name
$arguments
리턴 void | mixed

__construct() 공개 메소드

public __construct ( Fenos\Notifynder\Contracts\NotifynderCategory $notifynderCategory, Fenos\Notifynder\Contracts\NotifynderSender $notifynderSender, Fenos\Notifynder\Contracts\NotifynderNotification $notification, Fenos\Notifynder\Contracts\NotifynderDispatcher $notifynderDispatcher, Fenos\Notifynder\Contracts\NotifynderGroup $notifynderGroup )
$notifynderCategory Fenos\Notifynder\Contracts\NotifynderCategory
$notifynderSender Fenos\Notifynder\Contracts\NotifynderSender
$notification Fenos\Notifynder\Contracts\NotifynderNotification
$notifynderDispatcher Fenos\Notifynder\Contracts\NotifynderDispatcher
$notifynderGroup Fenos\Notifynder\Contracts\NotifynderGroup

__get() 공개 메소드

Get property from the builder.
public __get ( $name ) : mixed
$name
리턴 mixed

__set() 공개 메소드

Set builder properties When setting dynamic properties.
public __set ( $name, $value )
$name
$value

addCategoriesToGroup() 공개 메소드

Add categories to a group having as first parameter the name of the group, and others as name categories.
public addCategoriesToGroup ( ) : mixed
리턴 mixed

addCategory() 공개 메소드

Add a category.
public addCategory ( $name, $text ) : static
$name
$text
리턴 static

addCategoryToGroupById() 공개 메소드

Add category to a group giving the ids of them.
public addCategoryToGroupById ( $groupId, $categoryId ) : mixed
$groupId
$categoryId
리턴 mixed

addCategoryToGroupByName() 공개 메소드

Add category to a group giving the names of them.
public addCategoryToGroupByName ( $groupName, $categoryName ) : mixed
$groupName
$categoryName
리턴 mixed

bootListeners() 공개 메소드

Boot Listeners.
public bootListeners ( array $listeners )
$listeners array

builder() 공개 메소드

Get instance of the notifynder builder.
public builder ( ) : NotifynderBuilder
리턴 Fenos\Notifynder\Builder\NotifynderBuilder

category() 공개 메소드

Set the category of the notification.
public category ( $name )
$name

countNotRead() 공개 메소드

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

delegate() 공개 메소드

Associate events to categories.
public delegate ( array $delegation, $data = [] ) : mixed
$delegation array
$data
리턴 mixed

delete() 공개 메소드

Delete a single notification.
public delete ( $notificationId ) : boolean
$notificationId
리턴 boolean

deleteAll() 공개 메소드

Delete all notifications of the the given entity.
public deleteAll ( $toId ) : boolean
$toId
리턴 boolean

deleteByCategory() 공개 메소드

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

deleteLimit() 공개 메소드

Delete number of notifications specified of the given entity.
public deleteLimit ( $toId, $number, string $order = 'ASC' ) : mixed
$toId
$number
$order string
리턴 mixed

dispatchWith() 공개 메소드

Define which method the event dispatcher has to send the notifications.
public dispatchWith ( $customSenderName )
$customSenderName

entity() 공개 메소드

Define an entity when Notifynder is used Polymorphically.
public entity ( $name )
$name

extend() 공개 메소드

Extend a custom sender method.
public extend ( $name, callable $registrar )
$name
$registrar callable

findNotificationById() 공개 메소드

Find Notification by ID.
public findNotificationById ( $notificationId ) : Illuminate\Database\Eloquent\Collection | Model | static
$notificationId
리턴 Illuminate\Database\Eloquent\Collection | Illuminate\Database\Eloquent\Model | static

fire() 공개 메소드

Fire method for fire listeners of logic.
public fire ( string $key, string $categoryName, mixed | null $values = [] ) : mixed | null
$key string
$categoryName string
$values mixed | null
리턴 mixed | null

getAll() 공개 메소드

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

getCategoriesContainer() 공개 메소드

Get the categoriesContainer property.
public getCategoriesContainer ( $name ) : array
$name
리턴 array

getLastNotification() 공개 메소드

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

getNotRead() 공개 메소드

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

id() 공개 메소드

Return the Id of the category.
public id ( ) : mixed
리턴 mixed

isLazyLoaded() 보호된 메소드

Check if the category is eager Loaded.
protected isLazyLoaded ( $name ) : boolean
$name
리턴 boolean

readAll() 공개 메소드

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

readLimit() 공개 메소드

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

readOne() 공개 메소드

Read one notification.
public readOne ( $notificationId ) : boolean | Notification
$notificationId
리턴 boolean | Fenos\Notifynder\Models\Notification

send() 공개 메소드

Send notifications Both multiple and single.
public send ( array $info = [] ) : mixed
$info array
리턴 mixed

sendGroup() 공개 메소드

Send a group of notifications.
public sendGroup ( $groupName, $info = [] ) : mixed
$groupName
$info
리턴 mixed

sendMultiple() 공개 메소드

Send multiple notifications.
public sendMultiple ( array $info = [] ) : SendMultiple
$info array
리턴 Fenos\Notifynder\Senders\SendMultiple

sendNow() 공개 메소드

Send immediately the notification even if the queue is enabled.
public sendNow ( array $info = [] ) : mixed
$info array
리턴 mixed

sendOne() 공개 메소드

Send One notification.
public sendOne ( array $info = [] ) : mixed
$info array
리턴 mixed

setCategoriesContainer() 보호된 메소드

Push a category in the categoriesContainer property.
protected setCategoriesContainer ( $name, array $categoriesContainer )
$name
$categoriesContainer array

updateCategory() 공개 메소드

Update a category.
public updateCategory ( array $updates, $categoryId ) : mixed
$updates array
$categoryId
리턴 mixed

프로퍼티 상세

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

protected array $categoriesContainer
리턴 array

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

protected NotificationCategory,Fenos\Notifynder\Models|null $defaultCategory
리턴 Fenos\Notifynder\Models\NotificationCategory | null

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

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

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

This sender method will be used on the dispatcher.
protected string $eventSender
리턴 string

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

protected NotifynderNotification,Fenos\Notifynder\Contracts $notification
리턴 Fenos\Notifynder\Contracts\NotifynderNotification

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

protected NotifynderCategory,Fenos\Notifynder\Contracts $notifynderCategory
리턴 Fenos\Notifynder\Contracts\NotifynderCategory

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

protected NotifynderDispatcher,Fenos\Notifynder\Contracts $notifynderDispatcher
리턴 Fenos\Notifynder\Contracts\NotifynderDispatcher

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

protected NotifynderGroup,Fenos\Notifynder\Contracts $notifynderGroup
리턴 Fenos\Notifynder\Contracts\NotifynderGroup

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

protected NotifynderSender,Fenos\Notifynder\Contracts $notifynderSender
리턴 Fenos\Notifynder\Contracts\NotifynderSender