Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Modules\Mail\Application\Service; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | /** |
| 12 | * Interface for Compiling Modular Email Blocks into Client-Safe Responsive HTML. |
| 13 | * |
| 14 | * @package App\Modules\Mail\Application\Service |
| 15 | */ |
| 16 | interface EmailTemplateCompilerServiceInterface |
| 17 | { |
| 18 | /** |
| 19 | * Compiles raw blocks data into email-safe responsive HTML markup. |
| 20 | * |
| 21 | * @param array<string, mixed>|string $blocksData Serialized block JSON or array. |
| 22 | * @param string|null $cssStyles Optional custom CSS stylesheet. |
| 23 | * @return string Standalone responsive HTML document with inlined CSS. |
| 24 | */ |
| 25 | public function compileBlocks(array|string $blocksData, ?string $cssStyles = null): string; |
| 26 | |
| 27 | /** |
| 28 | * Returns all available email block definitions from domain registry. |
| 29 | * |
| 30 | * @return array<string, array<string, mixed>> |
| 31 | */ |
| 32 | public function getAvailableBlocks(): array; |
| 33 | } |
| 34 |