Feature: Implement multi-stage Conversation Flow Engine with TestFlow
This commit is contained in:
20
backend/app/Core/Flows/BaseFlow.php
Normal file
20
backend/app/Core/Flows/BaseFlow.php
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user