public function setTravelMode($travelMode = null)
    {
        if (!in_array($travelMode, TravelMode::getTravelModes()) && ($travelMode !== null)) {
            throw DirectionsException::invalidDirectionsRequestTravelMode();
        }

        $this->travelMode = $travelMode;
    }
public function setTravelMode($travelMode = null)
    {
        if (!in_array($travelMode, TravelMode::getTravelModes()) && ($travelMode !== null)) {
            throw DirectionsException::invalidDirectionsRequestTravelMode();
        }

        $this->travelMode = $travelMode;
    }
public function setTravelMode ( $ travelMode = null ) { if ( ! in_array ( $ travelMode , TravelMode :: getTravelModes ( ) ) && ( $ travelMode !== null ) ) { throw DirectionsException :: invalidDirectionsRequestTravelMode ( ) ; } $ this -> travelMode = $ travelMode ; }
Sets the directions request travel mode.

@param string $travelMode The directions request travel mode.

@throws \Ivory\GoogleMap\Exception\DirectionsException If the travel mode is not valid.
Sets the directions request travel mode .