M1\Vars\Vars::mergeGlobals PHP Method

mergeGlobals() private method

Gets the _globals from the file and merges them if merge_globals is true
private mergeGlobals ( array $content, array $options ) : array
$content array The unparsed content
$options array The options being used for Vars
return array $content The parsed content
    private function mergeGlobals($content, $options)
    {
        if (array_key_exists('_globals', $content)) {
            $this->globals = $content['_globals'];
            if ($options['merge_globals']) {
                $content = array_replace_recursive($content, $content['_globals']);
            }
            unset($content['_globals']);
        }
        return $content;
    }