• File: McpErrorHandlerInterface.php
  • Full Path: /home/baristalay/public_html/mcp-adapter/includes/Infrastructure/ErrorHandling/Contracts/McpErrorHandlerInterface.php
  • Date Modified: 06/03/2026 11:18 AM
  • File size: 760 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php
/**
 * Interface for MCP error handlers.
 *
 * @package McpAdapter
 */

declare( strict_types=1 );

namespace WP\MCP\Infrastructure\ErrorHandling\Contracts;

/**
 * Interface for handling MCP error logging.
 *
 * This interface defines the contract for error handlers that can log
 * error messages with context information and different severity types.
 */
interface McpErrorHandlerInterface {

	/**
	 * Log an error message with optional context and type.
	 *
	 * @param string $message The log message.
	 * @param array  $context Additional context data.
	 * @param string $type The log type (e.g., 'error', 'info', 'debug').
	 *
	 * @return void
	 */
	public function log( string $message, array $context = array(), string $type = 'error' ): void;
}