PHP 클래스 Fenos\Notifynder\Parsers\NotifynderParser

파일 보기 프로젝트 열기: fenos/notifynder 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$strictMode boolean By default it's false.

공개 메소드들

메소드 설명
parse ( $item ) : string Parse the body of a notification with your extras values or relation values.
setStrictExtra ( boolean | true $set = true ) Set strict mode.

보호된 메소드들

메소드 설명
extraToArray ( $extra ) : array | mixed Trying to transform extra in from few data types to array type.
getValues ( $body ) : mixed Get the values between {} and return an array of it.
isJson ( $value ) : boolean Check if is a json string.
mixedGet ( array | object $object, string $key, null $default = null ) : mixed Get a value by dot-key of an array, object or mix of both.
replaceBody ( $body, $valueMatch, $replacer ) : mixed Replace body of the category.

메소드 상세

extraToArray() 보호된 메소드

Trying to transform extra in from few data types to array type.
protected extraToArray ( $extra ) : array | mixed
$extra
리턴 array | mixed

getValues() 보호된 메소드

Get the values between {} and return an array of it.
protected getValues ( $body ) : mixed
$body
리턴 mixed

isJson() 보호된 메소드

Check if is a json string.
protected isJson ( $value ) : boolean
$value
리턴 boolean

mixedGet() 보호된 메소드

Get a value by dot-key of an array, object or mix of both.
protected mixedGet ( array | object $object, string $key, null $default = null ) : mixed
$object array | object
$key string
$default null
리턴 mixed

parse() 공개 메소드

Parse the body of a notification with your extras values or relation values.
public parse ( $item ) : string
$item
리턴 string

replaceBody() 보호된 메소드

Replace body of the category.
protected replaceBody ( $body, $valueMatch, $replacer ) : mixed
$body
$valueMatch
$replacer
리턴 mixed

setStrictExtra() 공개 정적인 메소드

if it's enabled then will throws exceptions when extra params will not be parsed correctly will be handy in development.
public static setStrictExtra ( boolean | true $set = true )
$set boolean | true

프로퍼티 상세

$strictMode 보호되어 있는 정적으로 프로퍼티

By default it's false.
protected static bool $strictMode
리턴 boolean