Feature: Implement multi-stage Conversation Flow Engine with TestFlow

This commit is contained in:
Hamza-Ayed
2026-05-22 05:11:35 +03:00
parent b82a02f6fa
commit 7ec4d9becb
11 changed files with 737 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Core\Flows;
/**
* BaseFlow
* Abstract base class for all conversation flow states.
*/
abstract class BaseFlow
{
/**
* Process a step in the conversation flow.
*
* @param string $step The current step identifier ('start' for new flows)
* @param array $messageData The incoming WhatsApp message payload (body, phone, etc.)
* @param array $context Reference to the persistent JSON context array
* @return FlowResult
*/
abstract public function handleStep(string $step, array $messageData, array &$context): FlowResult;
}