public function setRegion($region = null)
    {
        if ((!is_string($region) || (strlen($region) !== 2)) && ($region !== null)) {
            throw DirectionsException::invalidDirectionsRequestRegion();
        }

        $this->region = $region;
    }
public function setRegion($region = null)
    {
        if ((!is_string($region) || (strlen($region) !== 2)) && ($region !== null)) {
            throw DirectionsException::invalidDirectionsRequestRegion();
        }

        $this->region = $region;
    }
public function setRegion ( $ region = null ) { if ( ( ! is_string ( $ region ) || ( strlen ( $ region ) !== 2 ) ) && ( $ region !== null ) ) { throw DirectionsException :: invalidDirectionsRequestRegion ( ) ; } $ this -> region = $ region ; }
Sets the directions request region.

@param string $region The directions request region.

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