src/Workout/Dumper/GPX.php
private function writeTracks(\XMLWriter $xmlWriter, Workout $workout)
    {
        foreach ($workout->tracks() as $track) {
            $xmlWriter->startElement('trk');
            $xmlWriter->writeElement('type', $track->sport());
            $xmlWriter->startElement('trkseg');
            $this->writeTrackPoints($xmlWriter, $track->trackPoints());
            $xmlWriter->endElement();
            $xmlWriter->endElement();
        }
    }
private function writeTracks(\XMLWriter $xmlWriter, Workout $workout)
    {
        foreach ($workout->tracks() as $track) {
            $xmlWriter->startElement('trk');
            $xmlWriter->writeElement('type', $track->sport());
            $xmlWriter->startElement('trkseg');
            $this->writeTrackPoints($xmlWriter, $track->trackPoints());
            $xmlWriter->endElement();
            $xmlWriter->endElement();
        }
    }
private function writeTracks ( \ XMLWriter $ xmlWriter , Workout $ workout ) { foreach ( $ workout -> tracks ( ) as $ track ) { $ xmlWriter -> startElement ( 'trk' ) ; $ xmlWriter -> writeElement ( 'type' , $ track -> sport ( ) ) ; $ xmlWriter -> startElement ( 'trkseg' ) ; $ this -> writeTrackPoints ( $ xmlWriter , $ track -> trackPoints ( ) ) ; $ xmlWriter -> endElement ( ) ; $ xmlWriter -> endElement ( ) ; } }
Write the tracks to the GPX.

@param \XMLWriter $xmlWriter The XML writer.
@param Workout $workout The workout.
Write the tracks to the GPX .