src/Workout/Dumper/GPX.php
protected function writeExtensions(\XMLWriter $xmlWriter, array $extensions)
    {
        $xmlWriter->startElement('extensions');
        foreach ($extensions as $extension) {
            switch ($extension::ID()) {
                case HR::ID():
                    $xmlWriter->startElementNs('gpxtpx', 'TrackPointExtension', null);
                    $xmlWriter->writeElementNs('gpxtpx', 'hr', null, (string)$extension->value());
                    $xmlWriter->endElement();
                    break;
            }
        }
        $xmlWriter->endElement();
    }
protected function writeExtensions(\XMLWriter $xmlWriter, array $extensions)
    {
        $xmlWriter->startElement('extensions');
        foreach ($extensions as $extension) {
            switch ($extension::ID()) {
                case HR::ID():
                    $xmlWriter->startElementNs('gpxtpx', 'TrackPointExtension', null);
                    $xmlWriter->writeElementNs('gpxtpx', 'hr', null, (string)$extension->value());
                    $xmlWriter->endElement();
                    break;
            }
        }
        $xmlWriter->endElement();
    }
protected function writeExtensions ( \ XMLWriter $ xmlWriter , array $ extensions ) { $ xmlWriter -> startElement ( 'extensions' ) ; foreach ( $ extensions as $ extension ) { switch ( $ extension :: ID ( ) ) { case HR :: ID ( ) : $ xmlWriter -> startElementNs ( 'gpxtpx' , 'TrackPointExtension' , null ) ; $ xmlWriter -> writeElementNs ( 'gpxtpx' , 'hr' , null , ( string ) $ extension -> value ( ) ) ; $ xmlWriter -> endElement ( ) ; break ; } } $ xmlWriter -> endElement ( ) ; }
Write the extensions into the GPX.

@param \XMLWriter $xmlWriter The XMLWriter.
@param ExtensionInterface[] $extensions The extensions to write.
Write the extensions into the GPX .