PHP Класс Fenos\Notifynder\Parsers\NotifynderParser

Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$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