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
파일 보기 프로젝트 열기: fenos/notifynder 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$date notification to store

보호된 프로퍼티들

프로퍼티 타입 설명
$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