MappingRule
in package
Tags
Table of Contents
- $origin : mixed
- $propertyPath : mixed
- $targetPath : mixed
- __construct() : mixed
- getOrigin() : FormInterface
- getTarget() : FormInterface
- isPrefix() : bool
- Matches a property path against a prefix of the rule path.
- match() : FormInterface|null
- Matches a property path against the rule path.
Properties
$origin
private
mixed
$origin
$propertyPath
private
mixed
$propertyPath
$targetPath
private
mixed
$targetPath
Methods
__construct()
public
__construct(FormInterface $origin, string $propertyPath, string $targetPath) : mixed
Parameters
- $origin : FormInterface
- $propertyPath : string
- $targetPath : string
Return values
mixed —getOrigin()
public
getOrigin() : FormInterface
Return values
FormInterface —getTarget()
public
getTarget() : FormInterface
Tags
Return values
FormInterface —isPrefix()
Matches a property path against a prefix of the rule path.
public
isPrefix(string $propertyPath) : bool
Parameters
- $propertyPath : string
-
The property path to match against the rule
Return values
bool —Whether the property path is a prefix of the rule or not
match()
Matches a property path against the rule path.
public
match(string $propertyPath) : FormInterface|null
If the rule matches, the form mapped by the rule is returned. Otherwise this method returns false.
Parameters
- $propertyPath : string
-
The property path to match against the rule
Return values
FormInterface|null —The mapped form or null