PHP Class 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.
Inheritance: implements ArrayAcces\ArrayAccess, use trait BuilderRules
Afficher le fichier Open project: fenos/notifynder Class Usage Examples

Méthodes publiques

Свойство Type Description
$date notification to store

Protected Properties

Свойство Type Description
$config Illuminate\Contracts\Config\Repository
$notifications array Builder data.

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
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.

Method Details

__construct() public méthode

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

category() public méthode

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

expire() public méthode

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

extra() public méthode

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

from() public méthode

Set who will send the notification.
public from ( )

getDate() protected méthode

protected getDate ( ) : string
Résultat string

hasEntity() protected méthode

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
Résultat boolean

isIterable() protected méthode

protected isIterable ( $var ) : boolean
$var
Résultat boolean

loop() public méthode

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

offsetExists() public méthode

public offsetExists ( mixed $offset ) : boolean
$offset mixed
Résultat boolean

offsetGet() public méthode

public offsetGet ( mixed $offset ) : mixed
$offset mixed
Résultat mixed

offsetSet() public méthode

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

offsetUnset() public méthode

public offsetUnset ( mixed $offset ) : null
$offset mixed
Résultat null

raw() public méthode

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
Résultat array | false

refresh() public méthode

Refresh the state of the notifications.
public refresh ( )

setBuilderData() public méthode

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

setConfig() public méthode

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

setDate() protected méthode

Set date on the array.
protected setDate ( )

setEntityAction() protected méthode

It set the entity who will do the action of receive or send.
protected setEntityAction ( $from, $property ) : array
$from
$property
Résultat array

setField() public méthode

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

to() public méthode

Set who will receive the notification.
public to ( )

toArray() public méthode

Compose the builder to the array.
public toArray ( ) : mixed
Résultat mixed

url() public méthode

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

Property Details

$config protected_oe property

protected Repository,Illuminate\Contracts\Config $config
Résultat Illuminate\Contracts\Config\Repository

$date public_oe property

notification to store
public $date

$notifications protected_oe property

Builder data.
protected array $notifications
Résultat array