Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 991
Zeile 11... Zeile 11...
11
 * file that was distributed with this source code.
11
 * file that was distributed with this source code.
12
 */
12
 */
Zeile 13... Zeile 13...
13
 
13
 
Zeile -... Zeile 14...
-
 
14
namespace League\CommonMark\Extension\FrontMatter\Data;
14
namespace League\CommonMark\Extension\FrontMatter\Data;
15
 
15
 
16
use League\CommonMark\Exception\MissingDependencyException;
16
use League\CommonMark\Extension\FrontMatter\Exception\InvalidFrontMatterException;
17
use League\CommonMark\Extension\FrontMatter\Exception\InvalidFrontMatterException;
Zeile 17... Zeile 18...
17
use Symfony\Component\Yaml\Exception\ParseException;
18
use Symfony\Component\Yaml\Exception\ParseException;
Zeile 23... Zeile 24...
23
     * {@inheritDoc}
24
     * {@inheritDoc}
24
     */
25
     */
25
    public function parse(string $frontMatter)
26
    public function parse(string $frontMatter)
26
    {
27
    {
27
        if (! \class_exists(Yaml::class)) {
28
        if (! \class_exists(Yaml::class)) {
28
            throw new \RuntimeException('Failed to parse yaml: "symfony/yaml" library is missing');
29
            throw new MissingDependencyException('Failed to parse yaml: "symfony/yaml" library is missing');
29
        }
30
        }
Zeile 30... Zeile 31...
30
 
31
 
31
        try {
32
        try {
32
            return Yaml::parse($frontMatter);
33
            return Yaml::parse($frontMatter);