1 | <?php |
||
20 | final class FrontMatter implements FrontMatterInterface, FrontMatterExistsInterface |
||
21 | { |
||
22 | /** @var string */ |
||
23 | private $startSep; |
||
24 | |||
25 | /** @var string */ |
||
26 | private $endSep; |
||
27 | |||
28 | /** @var ProcessorInterface */ |
||
29 | private $processor; |
||
30 | |||
31 | /** @var string */ |
||
32 | private $regexp; |
||
33 | |||
34 | public static function createYaml(): self |
||
38 | |||
39 | public static function createToml(): self |
||
43 | |||
44 | public static function createJson(): self |
||
48 | |||
49 | public function __construct(ProcessorInterface $processor = null, string $startSep = '---', string $endSep = '---') |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | public function parse(string $source): Document |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public function dump(Document $document): string |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | public function exists(string $source): bool |
||
93 | } |
||
94 |