PHP Class Fenos\Notifynder\Parsers\NotifynderParser

Afficher le fichier Open project: fenos/notifynder Class Usage Examples

Protected Properties

Свойство Type Description
$strictMode boolean By default it's false.

Méthodes publiques

Méthode Description
parse ( $item ) : string Parse the body of a notification with your extras values or relation values.
setStrictExtra ( boolean | true $set = true ) Set strict mode.

Méthodes protégées

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

Method Details

extraToArray() protected méthode

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

getValues() protected méthode

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

isJson() protected méthode

Check if is a json string.
protected isJson ( $value ) : boolean
$value
Résultat boolean

mixedGet() protected méthode

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

parse() public méthode

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

replaceBody() protected méthode

Replace body of the category.
protected replaceBody ( $body, $valueMatch, $replacer ) : mixed
$body
$valueMatch
$replacer
Résultat mixed

setStrictExtra() public static méthode

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

Property Details

$strictMode protected_oe static_oe property

By default it's false.
protected static bool $strictMode
Résultat boolean