private function getHeaderByFlag(): string
    {
        $namespaces = [
            'video' => 'xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"',
            'image' => 'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"',
        ];

        $result = '';
        foreach ($this->headers as $flag) {
            $result .= ' '.$namespaces[$flag];
        }

        return $result;
    }
private function getHeaderByFlag(): string
    {
        $namespaces = [
            'video' => 'xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"',
            'image' => 'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"',
        ];

        $result = '';
        foreach ($this->headers as $flag) {
            $result .= ' '.$namespaces[$flag];
        }

        return $result;
    }
private function getHeaderByFlag ( ) : string { $ namespaces = [ 'video' => 'xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"' , 'image' => 'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"' , ] ; $ result = '' ; foreach ( $ this -> headers as $ flag ) { $ result .= ' ' . $ namespaces [ $ flag ] ; } return $ result ; }
Generate additional header with namespace adapted to the content.
Generate additional header with namespace adapted to the content .