-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmjml.stubs.php
78 lines (65 loc) · 1.93 KB
/
mjml.stubs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
declare(strict_types=1);
// Stubs for mjml
namespace Mjml {
use Mjml\Exception\RenderException;
use Stringable;
use TypeError;
class Email implements Stringable {
/**
* Gets the email title/subject if set.
*/
public function getTitle(): ?string {}
/**
* Gets the email preview text, if present.
*/
public function getPreview(): ?string {}
/**
* Gets the email HTML body.
*/
public function getBody(): string {}
/**
* @inheritDoc
*/
public function __toString(): string {}
}
class Mjml {
/**
* Constructor.
*
* Accepts the following options:
* - disable_comments: If true, do not include comments in the HTML output
* - social_icon_origin: Base URL for mj-social-element images
* /- fonts: Key-value array of fonts used in the email body
*
* @param array{disable_comments?: bool, social_icon_origin?: string, fonts?: array{string, string}}|null $options
*
* @throws TypeError if passed options are of wrong types.
*/
public function __construct(?array $options = null) {}
/**
* Returns the default fonts hashmap used in rendered emails.
*
* @return array<string, string>
*/
static public function defaultFonts(): array {}
/**
* Renders a MJML template into an email-friendly HTML markup.
*
* @throws RenderException
*/
public function render(string $mjml): Email {}
/**
* Render a MJML file.
* PHP Stream wrappers are supported.
*
* @throws RenderException
*/
public function renderFile(string $path): Email {}
}
}
namespace Mjml\Exception {
use Exception;
class RenderException extends Exception {
}
}