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
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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