MessageInterface::getHeader()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Genkgo\Mail;
5
6
interface MessageInterface
7
{
8
    /**
9
     * @return iterable<iterable<HeaderInterface>>
0 ignored issues
show
Documentation introduced by
The doc-type iterable<iterable<HeaderInterface>> could not be parsed: Expected "|" or "end of type", but got "<" at position 8. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
10
     */
11
    public function getHeaders(): iterable;
12
13
    /**
14
     * @param string $name
15
     * @return bool
16
     */
17
    public function hasHeader(string $name): bool;
18
19
    /**
20
     * @param string $name
21
     * @return iterable|HeaderInterface[]
22
     */
23
    public function getHeader(string $name): iterable;
24
25
    /**
26
     * @param HeaderInterface $header
27
     * @return MessageInterface
28
     */
29
    public function withHeader(HeaderInterface $header): MessageInterface;
30
31
    /**
32
     * @param HeaderInterface $header
33
     * @return MessageInterface
34
     */
35
    public function withAddedHeader(HeaderInterface $header): MessageInterface;
36
37
    /**
38
     * @param string $name
39
     * @return MessageInterface
40
     */
41
    public function withoutHeader(string $name): MessageInterface;
42
43
    /**
44
     * @return StreamInterface
45
     */
46
    public function getBody(): StreamInterface ;
47
48
    /**
49
     * @param StreamInterface $body
50
     * @return MessageInterface
51
     */
52
    public function withBody(StreamInterface $body): MessageInterface;
53
54
    /**
55
     * @return string
56
     */
57
    public function __toString(): string;
58
}
59