PolicyBuckets
in package
FinalYes
Routes mixed policy bags into the typed buckets used by execution and planning.
Table of Contents
Constants
- ALL = 'policies'
- ALLOCATION = 'allocation-policies'
- FILTER = 'filter-policies'
- ORDERING = 'ordering-policies'
- PLANNER = 'planner-policies'
- QUANTITY_CONSTRAINT = 'quantity-constraint-policies'
- SHIPMENT_CALENDAR = 'shipment-calendar-rules'
- SHIPMENT_SPLIT = 'shipment-split-rules'
Methods
- all() : array<int, PolicyInterface>
- applyToStep() : void
- Apply a mixed policy bag to a flow step.
- matchesAny() : bool
- mergeEdgeAttributes() : array<string|int, mixed>
- Attach planner-capable policies to one edge-rule metadata array.
- planner() : array<int, PlannerRuleInterface>
- resolveCategory() : array<int, TPolicy>
- Resolve one typed category out of a raw policy sequence, applying named overrides.
- shipmentCalendar() : array<int, ShipmentCalendarRuleInterface>
- shipmentSplit() : array<int, ShipmentSplitRuleInterface>
- unwrap() : PolicyInterface}
Constants
ALL
public
mixed
ALL
= 'policies'
ALLOCATION
public
mixed
ALLOCATION
= 'allocation-policies'
FILTER
public
mixed
FILTER
= 'filter-policies'
ORDERING
public
mixed
ORDERING
= 'ordering-policies'
PLANNER
public
mixed
PLANNER
= 'planner-policies'
QUANTITY_CONSTRAINT
public
mixed
QUANTITY_CONSTRAINT
= 'quantity-constraint-policies'
SHIPMENT_CALENDAR
public
mixed
SHIPMENT_CALENDAR
= 'shipment-calendar-rules'
SHIPMENT_SPLIT
public
mixed
SHIPMENT_SPLIT
= 'shipment-split-rules'
Methods
all()
public
static all(array<string|int, mixed> $attributes) : array<int, PolicyInterface>
Parameters
- $attributes : array<string|int, mixed>
Return values
array<int, PolicyInterface>applyToStep()
Apply a mixed policy bag to a flow step.
public
static applyToStep(FlowStep $step, array<string|int, PolicyInterface> $policies) : void
Parameters
- $step : FlowStep
- $policies : array<string|int, PolicyInterface>
matchesAny()
public
static matchesAny(PolicyInterface $_policy) : bool
Parameters
- $_policy : PolicyInterface
Return values
boolmergeEdgeAttributes()
Attach planner-capable policies to one edge-rule metadata array.
public
static mergeEdgeAttributes(array<string|int, mixed> $attributes, array<string|int, PolicyInterface> $policies) : array<string|int, mixed>
Parameters
- $attributes : array<string|int, mixed>
- $policies : array<string|int, PolicyInterface>
Return values
array<string|int, mixed>planner()
public
static planner(array<string|int, mixed> $attributes) : array<int, PlannerRuleInterface>
Parameters
- $attributes : array<string|int, mixed>
Return values
array<int, PlannerRuleInterface>resolveCategory()
Resolve one typed category out of a raw policy sequence, applying named overrides.
public
static resolveCategory(array<string|int, PolicyInterface> $policies, callable(PolicyInterface): bool $matches) : array<int, TPolicy>
Parameters
- $policies : array<string|int, PolicyInterface>
- $matches : callable(PolicyInterface): bool
Tags
Return values
array<int, TPolicy>shipmentCalendar()
public
static shipmentCalendar(array<string|int, mixed> $attributes) : array<int, ShipmentCalendarRuleInterface>
Parameters
- $attributes : array<string|int, mixed>
Return values
array<int, ShipmentCalendarRuleInterface>shipmentSplit()
public
static shipmentSplit(array<string|int, mixed> $attributes) : array<int, ShipmentSplitRuleInterface>
Parameters
- $attributes : array<string|int, mixed>
Return values
array<int, ShipmentSplitRuleInterface>unwrap()
private
static unwrap(PolicyInterface $policy) : PolicyInterface}
Parameters
- $policy : PolicyInterface