public function setUnitSystem($unitSystem = null)
    {
        if (!in_array($unitSystem, UnitSystem::getUnitSystems()) && ($unitSystem !== null)) {
            throw DirectionsException::invalidDirectionsRequestUnitSystem();
        }

        $this->unitSystem = $unitSystem;
    }
public function setUnitSystem($unitSystem = null)
    {
        if (!in_array($unitSystem, UnitSystem::getUnitSystems()) && ($unitSystem !== null)) {
            throw DirectionsException::invalidDirectionsRequestUnitSystem();
        }

        $this->unitSystem = $unitSystem;
    }
public function setUnitSystem ( $ unitSystem = null ) { if ( ! in_array ( $ unitSystem , UnitSystem :: getUnitSystems ( ) ) && ( $ unitSystem !== null ) ) { throw DirectionsException :: invalidDirectionsRequestUnitSystem ( ) ; } $ this -> unitSystem = $ unitSystem ; }
Sets  the directions request unit system.

@param string $unitSystem The directions request unit system.

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