xref: /webtrees/app/Contracts/MarkdownFactoryInterface.php (revision 2c6f1bd538f46b93645991518398bb087011cb42)
14d35caa7SGreg Roach<?php
24d35caa7SGreg Roach
34d35caa7SGreg Roach/**
44d35caa7SGreg Roach * webtrees: online genealogy
5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
64d35caa7SGreg Roach * This program is free software: you can redistribute it and/or modify
74d35caa7SGreg Roach * it under the terms of the GNU General Public License as published by
84d35caa7SGreg Roach * the Free Software Foundation, either version 3 of the License, or
94d35caa7SGreg Roach * (at your option) any later version.
104d35caa7SGreg Roach * This program is distributed in the hope that it will be useful,
114d35caa7SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
124d35caa7SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
134d35caa7SGreg Roach * GNU General Public License for more details.
144d35caa7SGreg Roach * You should have received a copy of the GNU General Public License
154d35caa7SGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
164d35caa7SGreg Roach */
174d35caa7SGreg Roach
184d35caa7SGreg Roachdeclare(strict_types=1);
194d35caa7SGreg Roach
204d35caa7SGreg Roachnamespace Fisharebest\Webtrees\Contracts;
214d35caa7SGreg Roach
224d35caa7SGreg Roachuse Fisharebest\Webtrees\Tree;
234d35caa7SGreg Roach
244d35caa7SGreg Roach/**
254d35caa7SGreg Roach * Create a markdown converter.
264d35caa7SGreg Roach */
274d35caa7SGreg Roachinterface MarkdownFactoryInterface
284d35caa7SGreg Roach{
294d35caa7SGreg Roach    /**
306f595250SGreg Roach     * @param string    $markdown
314d35caa7SGreg Roach     * @param Tree|null $tree
324d35caa7SGreg Roach     *
336f595250SGreg Roach     * @return string
344d35caa7SGreg Roach     */
35*2c6f1bd5SGreg Roach    public function autolink(string $markdown, Tree|null $tree = null): string;
364d35caa7SGreg Roach
374d35caa7SGreg Roach    /**
386f595250SGreg Roach     * @param string    $markdown
394d35caa7SGreg Roach     * @param Tree|null $tree
404d35caa7SGreg Roach     *
416f595250SGreg Roach     * @return string
424d35caa7SGreg Roach     */
43*2c6f1bd5SGreg Roach    public function markdown(string $markdown, Tree|null $tree = null): string;
444d35caa7SGreg Roach}
45