PHP Интерфейс Fenos\Notifynder\Notifynder

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.
Показать файл Открыть проект

Открытые методы

Метод Описание
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 as default we have 'send' so will be $notifynder->send() if u pass 'sendCustom' it will be like $notifynder->sendCustom().
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, boolean $paginate = false, 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, boolean $paginate = false, 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 ) : integer 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.

Описание методов

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 as default we have 'send' so will be $notifynder->send() if u pass 'sendCustom' it will be like $notifynder->sendCustom().
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, boolean $paginate = false, string $order = 'desc', Closur\Closure $filterScope = null ) : mixed
$toId
$limit null
$paginate boolean
$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, boolean $paginate = false, string $order = 'desc', Closur\Closure $filterScope = null ) : mixed
$toId
$limit null
$paginate boolean
$order string
$filterScope Closur\Closure
Результат mixed

id() публичный Метод

Return the Id of the category.
public id ( ) : mixed
Результат mixed

readAll() публичный Метод

Read all notifications of the given entity.
public readAll ( $toId ) : integer
$toId
Результат integer

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

updateCategory() публичный Метод

Update a category.
public updateCategory ( array $updates, $categoryId ) : mixed
$updates array
$categoryId
Результат mixed