refactor: docs
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -13,16 +13,9 @@ use KTXF\Mail\Service\ServiceBaseInterface;
|
||||
use KTXF\Mail\Service\ServiceMutableInterface;
|
||||
|
||||
/**
|
||||
* Mail Provider Service Test Interface
|
||||
* Provider Service Test Interface
|
||||
*
|
||||
* Optional interface for mail providers that support testing service connections.
|
||||
* Providers implementing this interface can validate connection parameters,
|
||||
* test authentication, and verify service availability before creating a
|
||||
* persistent service configuration.
|
||||
*
|
||||
* Supports two testing modes:
|
||||
* 1. Testing an existing service (validate current configuration)
|
||||
* 2. Testing a fresh configuration (validate before saving)
|
||||
* Optional interface for providers that support testing service connections
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*/
|
||||
@@ -33,12 +26,7 @@ interface ProviderServiceTestInterface {
|
||||
/**
|
||||
* Test a service connection
|
||||
*
|
||||
* Tests connectivity, authentication, and capabilities of a service.
|
||||
*
|
||||
* For new services: use serviceFresh() to create a service, configure it with
|
||||
* setters, then pass it to this method for testing before persisting.
|
||||
*
|
||||
* For existing services: fetch the service and pass it directly.
|
||||
* Tests connectivity, authentication, and capabilities of a service
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*
|
||||
@@ -51,28 +39,8 @@ interface ProviderServiceTestInterface {
|
||||
*
|
||||
* @return array Test results in the format:
|
||||
* [
|
||||
* 'success' => bool,
|
||||
* 'disposition' => 'Success' | 'Failure' | 'Warning',
|
||||
* 'message' => 'Connection successful' | 'Error message',
|
||||
* 'details' => [
|
||||
* 'connected' => bool, // Socket/HTTP connection succeeded
|
||||
* 'authenticated' => bool, // Authentication succeeded
|
||||
* 'capabilities' => ['IMAP4rev1', ...], // Server capabilities (if applicable)
|
||||
* 'serverInfo' => 'Server version/banner',
|
||||
* 'latency' => 123, // Connection time in milliseconds
|
||||
* 'protocols' => [
|
||||
* 'inbound' => [
|
||||
* 'connected' => bool,
|
||||
* 'authenticated' => bool,
|
||||
* 'error' => 'error message if failed'
|
||||
* ],
|
||||
* 'outbound' => [ // For split-socket (IMAP+SMTP)
|
||||
* 'connected' => bool,
|
||||
* 'authenticated' => bool,
|
||||
* 'error' => 'error message if failed'
|
||||
* ]
|
||||
* ],
|
||||
* 'errors' => ['Error 1', 'Error 2'], // List of errors encountered
|
||||
* ]
|
||||
* ]
|
||||
*/
|
||||
public function serviceTest(ServiceBaseInterface|ServiceMutableInterface $service, array $options = []): array;
|
||||
|
||||
Reference in New Issue
Block a user