EdgeRule
in package
FinalYes
Declarative allow/deny rule for edges between slot patterns.
Tags
Table of Contents
Properties
- $allow : bool
- $attributes : array<string|int, mixed>
- $from : string|array<string|int, mixed>|null
- $label : string|null
- $to : string|array<string|int, mixed>|null
Methods
- __construct() : mixed
- Create one declarative edge allow/deny rule.
- allow() : self
- Create one unlabeled allow rule.
- allowLabeled() : self
- Create one labeled allow rule.
- connect() : RuleSet<string|int, EdgeRule>
- Allow movement between $from and $to in both directions.
- deny() : self
- Create one deny rule.
- disconnect() : RuleSet<string|int, EdgeRule>
- Deny movement between two patterns in both directions.
- meta() : self
- Return a copy of the rule with merged metadata attributes.
- plannerRules() : self
- Attach planner-rule declarations that shipment planners may evaluate later.
- policies() : self
- Attach typed planner policies that shipment planners may evaluate later.
Properties
$allow read-only
public
bool
$allow
$attributes read-only
public
array<string|int, mixed>
$attributes
= []
$from read-only
public
string|array<string|int, mixed>|null
$from
$label read-only
public
string|null
$label
= null
$to read-only
public
string|array<string|int, mixed>|null
$to
= null
Methods
__construct()
Create one declarative edge allow/deny rule.
public
__construct(bool $allow, array<int|string, string|null>|string|null $from[, array<int|string, string|null>|string|null $to = null ][, string|null $label = null ][, array<string|int, mixed> $attributes = [] ]) : mixed
Parameters
- $allow : bool
- $from : array<int|string, string|null>|string|null
- $to : array<int|string, string|null>|string|null = null
- $label : string|null = null
- $attributes : array<string|int, mixed> = []
Tags
allow()
Create one unlabeled allow rule.
public
static allow(array<int|string, string|null>|string|null $from[, array<int|string, string|null>|string|null $to = null ][, array<string|int, mixed> $meta = [] ]) : self
Parameters
- $from : array<int|string, string|null>|string|null
- $to : array<int|string, string|null>|string|null = null
- $meta : array<string|int, mixed> = []
Tags
Return values
selfallowLabeled()
Create one labeled allow rule.
public
static allowLabeled([string|null $label = null ], array<int|string, string|null>|string|null $from[, array<int|string, string|null>|string|null $to = null ][, array<string|int, mixed> $meta = [] ]) : self
Parameters
- $label : string|null = null
- $from : array<int|string, string|null>|string|null
- $to : array<int|string, string|null>|string|null = null
- $meta : array<string|int, mixed> = []
Tags
Return values
selfconnect()
Allow movement between $from and $to in both directions.
public
static connect(array<int|string, string|null>|string|null $patternA[, array<int|string, string|null>|string|null $patternB = null ][, array<string|int, mixed> $meta = [] ]) : RuleSet<string|int, EdgeRule>
Parameters
- $patternA : array<int|string, string|null>|string|null
- $patternB : array<int|string, string|null>|string|null = null
- $meta : array<string|int, mixed> = []
Tags
Return values
RuleSet<string|int, EdgeRule>deny()
Create one deny rule.
public
static deny([string|null $label = null ], array<int|string, string|null>|string|null $from[, array<int|string, string|null>|string|null $to = null ][, array<string|int, mixed> $meta = [] ]) : self
Parameters
- $label : string|null = null
- $from : array<int|string, string|null>|string|null
- $to : array<int|string, string|null>|string|null = null
- $meta : array<string|int, mixed> = []
Tags
Return values
selfdisconnect()
Deny movement between two patterns in both directions.
public
static disconnect(array<int|string, string|null>|string|null $patternA[, array<int|string, string|null>|string|null $patternB = null ][, array<string|int, mixed> $meta = [] ]) : RuleSet<string|int, EdgeRule>
Parameters
- $patternA : array<int|string, string|null>|string|null
- $patternB : array<int|string, string|null>|string|null = null
- $meta : array<string|int, mixed> = []
Tags
Return values
RuleSet<string|int, EdgeRule>meta()
Return a copy of the rule with merged metadata attributes.
public
meta(array<string|int, mixed> $attributes) : self
Parameters
- $attributes : array<string|int, mixed>
Return values
selfplannerRules()
Attach planner-rule declarations that shipment planners may evaluate later.
public
plannerRules(PlannerRuleInterface ...$rules) : self
Parameters
- $rules : PlannerRuleInterface
Return values
selfpolicies()
Attach typed planner policies that shipment planners may evaluate later.
public
policies(PolicyInterface ...$policies) : self
Parameters
- $policies : PolicyInterface