protected function addYamlFrontmatter($lines)
    {
        $text = implode("\n", $lines);
        $parsed = $this->parseYaml($text);

        if (!is_array($parsed)) {
            $parsed = [$parsed];
        }

        $this->frontmatter = array_merge($this->frontmatter, $parsed);
    }
protected function addYamlFrontmatter($lines)
    {
        $text = implode("\n", $lines);
        $parsed = $this->parseYaml($text);

        if (!is_array($parsed)) {
            $parsed = [$parsed];
        }

        $this->frontmatter = array_merge($this->frontmatter, $parsed);
    }
protected function addYamlFrontmatter ( $ lines ) { $ text = implode ( "\n" , $ lines ) ; $ parsed = $ this -> parseYaml ( $ text ) ; if ( ! is_array ( $ parsed ) ) { $ parsed = [ $ parsed ] ; } $ this -> frontmatter = array_merge ( $ this -> frontmatter , $ parsed ) ; }
Extract YAML frontmatter from text and merge into existing frontmatter.

@param array $lines the YAML to parsed.

@return void.
Extract YAML frontmatter from text and merge into existing frontmatter .