PHP Class Coduo\PHPMatcher\Matcher\ArrayMatcher

Inheritance: extends Matcher
Show file Open project: coduo/php-matcher Class Usage Examples

Public Methods

Method Description
__construct ( Coduo\PHPMatcher\Matcher\ValueMatcher $propertyMatcher, Coduo\PHPMatcher\Parser $parser )
canMatch ( $pattern ) {@inheritDoc}
match ( $value, $pattern ) {@inheritDoc}

Private Methods

Method Description
allExpandersMatch ( $value, $pattern ) : boolean
arrayPropertyExists ( string $property, array $objectOrArray ) : boolean
formatAccessPath ( $key ) : string
formatFullPath ( $parentPath, $path ) : string
getPropertyAccessor ( ) : Symfony\Component\PropertyAccess\PropertyAccessorInterface
getValueByPath ( $array, $path ) : mixed
isArrayPattern ( $pattern )
isPatternValid ( array $pattern, array $values, $parentPath ) : boolean Check if pattern elements exist in value array
iterateMatch ( array $values, array $patterns, string $parentPath = "" ) : boolean
setMissingElementInError ( $place, $path )
shouldSkippValueMatchingFor ( $lastPattern ) : boolean
valueExist ( $path, array $haystack ) : boolean
valueMatchPattern ( $value, $pattern ) : boolean

Method Details

__construct() public method

public __construct ( Coduo\PHPMatcher\Matcher\ValueMatcher $propertyMatcher, Coduo\PHPMatcher\Parser $parser )
$propertyMatcher Coduo\PHPMatcher\Matcher\ValueMatcher
$parser Coduo\PHPMatcher\Parser

canMatch() public method

{@inheritDoc}
public canMatch ( $pattern )

match() public method

{@inheritDoc}
public match ( $value, $pattern )