PHP Класс Fenos\Notifynder\Builder\NotifynderBuilder

The builder is a main factor of Notifynder, it make sure that the notification is decorated and validated before are passed to the Sender Classes. It also helps you to create multi notifications with the same simple and easy sintax.
Наследование: implements ArrayAcces\ArrayAccess, use trait BuilderRules
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$date notification to store

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

Свойство Тип Описание
$config Illuminate\Contracts\Config\Repository
$notifications array Builder data.

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

Метод Описание
__construct ( Fenos\Notifynder\Contracts\NotifynderCategory $notifynderCategory )
category ( $category ) Set Category and covert it, to the id if name of it given.
expire ( $datetime ) Set expire time.
extra ( array $extra = [] ) Set extra value.
from ( ) Set who will send the notification.
loop ( $dataToIterate, Closure $builder ) Loop the data for create multi notifications array.
offsetExists ( mixed $offset ) : boolean
offsetGet ( mixed $offset ) : mixed
offsetSet ( mixed $offset, mixed $value )
offsetUnset ( mixed $offset ) : null
raw ( Closure $closure ) : array | false Build the array with the builder inside a Closure, it has more flexibility for the generation of your array.
refresh ( ) Refresh the state of the notifications.
setBuilderData ( $field, $data ) Set builder Data.
setConfig ( Illuminate\Contracts\Config\Repository $config )
setField ( $key, $value ) Set additional fields value.
to ( ) Set who will receive the notification.
toArray ( ) : mixed Compose the builder to the array.
url ( $url ) Set the url of the notification.

Защищенные методы

Метод Описание
getDate ( ) : string
hasEntity ( array $info ) : boolean If the values passed are 2 or more, it means that you specified the entity over then the id.
isIterable ( $var ) : boolean
setDate ( ) Set date on the array.
setEntityAction ( $from, $property ) : array It set the entity who will do the action of receive or send.

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

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

public __construct ( Fenos\Notifynder\Contracts\NotifynderCategory $notifynderCategory )
$notifynderCategory Fenos\Notifynder\Contracts\NotifynderCategory

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

Set Category and covert it, to the id if name of it given.
public category ( $category )
$category

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

Set expire time.
public expire ( $datetime )
$datetime

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

Set extra value.
public extra ( array $extra = [] )
$extra array

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

Set who will send the notification.
public from ( )

getDate() защищенный Метод

protected getDate ( ) : string
Результат string

hasEntity() защищенный Метод

If the values passed are 2 or more, it means that you specified the entity over then the id.
protected hasEntity ( array $info ) : boolean
$info array
Результат boolean

isIterable() защищенный Метод

protected isIterable ( $var ) : boolean
$var
Результат boolean

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

Loop the data for create multi notifications array.
public loop ( $dataToIterate, Closure $builder )
$dataToIterate
$builder Closure

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

public offsetExists ( mixed $offset ) : boolean
$offset mixed
Результат boolean

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

public offsetGet ( mixed $offset ) : mixed
$offset mixed
Результат mixed

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

public offsetSet ( mixed $offset, mixed $value )
$offset mixed
$value mixed

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

public offsetUnset ( mixed $offset ) : null
$offset mixed
Результат null

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

Build the array with the builder inside a Closure, it has more flexibility for the generation of your array.
public raw ( Closure $closure ) : array | false
$closure Closure
Результат array | false

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

Refresh the state of the notifications.
public refresh ( )

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

Set builder Data.
public setBuilderData ( $field, $data )
$field
$data

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

public setConfig ( Illuminate\Contracts\Config\Repository $config )
$config Illuminate\Contracts\Config\Repository

setDate() защищенный Метод

Set date on the array.
protected setDate ( )

setEntityAction() защищенный Метод

It set the entity who will do the action of receive or send.
protected setEntityAction ( $from, $property ) : array
$from
$property
Результат array

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

Set additional fields value.
public setField ( $key, $value )
$key
$value

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

Set who will receive the notification.
public to ( )

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

Compose the builder to the array.
public toArray ( ) : mixed
Результат mixed

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

Set the url of the notification.
public url ( $url )
$url

Описание свойств

$config защищенное свойство

protected Repository,Illuminate\Contracts\Config $config
Результат Illuminate\Contracts\Config\Repository

$date публичное свойство

notification to store
public $date

$notifications защищенное свойство

Builder data.
protected array $notifications
Результат array