Files
nabeh/backend/app/Core/Flows/BaseFlow.php

21 lines
586 B
PHP

<?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;
}