GateServiceInterface
`$requesterId`/`$approverId`/`$rejectorId`/`$waiverId` are opaque principal strings (e.g. "member:42"), mirroring {@see \Milpa\Workflow\Entities\Evidence::getUploadedBy()} — the engine stores them verbatim and never resolves them to an entity; the consuming product owns identity (D9).
GateServiceInterface::requestPassage()
abstract public function requestPassage(Milpa\Workflow\Entities\GateDefinition $gate, string $entityType, int $entityId, string $requesterId, ?array $fieldValues = null): Milpa\Workflow\Entities\GatePassageRequests a new gate passage for the given gate and polymorphic entity.
Parameters
| Name | Type | Description |
|---|---|---|
| $gate | Milpa\Workflow\Entities\GateDefinition | |
| $entityType | string | |
| $entityId | int | |
| $requesterId | string | |
| $fieldValues | (array<string, mixed> | null) |
GateServiceInterface::approvePassage()
abstract public function approvePassage(Milpa\Workflow\Entities\GatePassage $passage, string $approverId, ?string $notes = null): Milpa\Workflow\Entities\GatePassageApproves a pending gate passage. Implementations must reject the call (typically via `SelfApprovalException`) when `$approverId` equals the passage's requester (D9).
Parameters
| Name | Type | Description |
|---|---|---|
| $passage | Milpa\Workflow\Entities\GatePassage | |
| $approverId | string | |
| $notes | ?string |
GateServiceInterface::rejectPassage()
abstract public function rejectPassage(Milpa\Workflow\Entities\GatePassage $passage, string $rejectorId, string $reason): Milpa\Workflow\Entities\GatePassageRejects a pending gate passage with a reason.
Parameters
| Name | Type | Description |
|---|---|---|
| $passage | Milpa\Workflow\Entities\GatePassage | |
| $rejectorId | string | |
| $reason | string |
GateServiceInterface::waiveGate()
abstract public function waiveGate(Milpa\Workflow\Entities\GateDefinition $gate, string $entityType, int $entityId, string $waiverId, string $justification): Milpa\Workflow\Entities\GatePassageApproves a gate passage without requiring its normal evidence/field requirements, recording the waiver and its justification. Implementations must reject the call (typically via `NonWaivableGateException`) when the gate is not waivable.
Parameters
| Name | Type | Description |
|---|---|---|
| $gate | Milpa\Workflow\Entities\GateDefinition | |
| $entityType | string | |
| $entityId | int | |
| $waiverId | string | |
| $justification | string |
GateServiceInterface::getApprovedPassagesForEntity()
abstract public function getApprovedPassagesForEntity(string $entityType, int $entityId): arrayReturns every approved gate passage for the given polymorphic entity.
Parameters
| Name | Type | Description |
|---|---|---|
| $entityType | string | |
| $entityId | int |