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
 
Zeile 15... Zeile 16...
15
 
16
use League\CommonMark\Exception\MissingDependencyException;
16
use League\CommonMark\Extension\FrontMatter\Exception\InvalidFrontMatterException;
17
use League\CommonMark\Extension\FrontMatter\Exception\InvalidFrontMatterException;
17
 
18
 
Zeile 30... Zeile 31...
30
     * {@inheritDoc}
31
     * {@inheritDoc}
31
     */
32
     */
32
    public function parse(string $frontMatter)
33
    public function parse(string $frontMatter)
33
    {
34
    {
34
        if (! \extension_loaded('yaml')) {
35
        if (! \extension_loaded('yaml')) {
35
            throw new \RuntimeException('Failed to parse yaml: "ext-yaml" extension is missing');
36
            throw new MissingDependencyException('Failed to parse yaml: "ext-yaml" extension is missing');
36
        }
37
        }
Zeile 37... Zeile 38...
37
 
38
 
Zeile 38... Zeile 39...
38
        $result = @\yaml_parse($frontMatter);
39
        $result = @\yaml_parse($frontMatter);