PHP Trait Fenos\Notifynder\Builder\BuilderRules

Simple trait that define the rules that the builder has to match. It required mandatory fields listed in the $requiredFields property
Show file Open project: fenos/notifynder

Public Methods

Method Description
getRequiredFields ( ) : array Returns all required fields including the config ones.
hasRequiredFields ( $array ) : boolean Check that the builder has the required field to send the notifications correctly.
isMultidimensionalArray ( $arr ) : boolean Check if the array is multidimensional.
isRequiredField ( $offset ) : boolean Check if is a required field.

Protected Methods

Method Description
isAssociativeArr ( array $arr ) : boolean
isCarbon ( $value ) : boolean | InvalidArgumentExceptio\InvalidArgumentException Value has to be a valid Carbon Instance.
isNumeric ( $value ) : boolean Value has to be numeric.
isReadyArrToFormatInJson ( array $arr ) : boolean Check if the array passed is multidimensional.
isString ( $value ) : boolean Value has to be a string.

Method Details

getRequiredFields() public method

Returns all required fields including the config ones.
public getRequiredFields ( ) : array
return array

hasRequiredFields() public method

Check that the builder has the required field to send the notifications correctly.
public hasRequiredFields ( $array ) : boolean
$array
return boolean

isAssociativeArr() protected method

protected isAssociativeArr ( array $arr ) : boolean
$arr array
return boolean

isCarbon() protected method

Value has to be a valid Carbon Instance.
protected isCarbon ( $value ) : boolean | InvalidArgumentExceptio\InvalidArgumentException
$value
return boolean | InvalidArgumentExceptio\InvalidArgumentException | InvalidArgumentException

isMultidimensionalArray() public method

Check if the array is multidimensional.
public isMultidimensionalArray ( $arr ) : boolean
$arr
return boolean

isNumeric() protected method

Value has to be numeric.
protected isNumeric ( $value ) : boolean
$value
return boolean

isReadyArrToFormatInJson() protected method

Check if the array passed is multidimensional.
protected isReadyArrToFormatInJson ( array $arr ) : boolean
$arr array
return boolean

isRequiredField() public method

Check if is a required field.
public isRequiredField ( $offset ) : boolean
$offset
return boolean

isString() protected method

Value has to be a string.
protected isString ( $value ) : boolean
$value
return boolean