public function setTimeoutsFromArray($arr) {
    /*
     * Validation is lax in here because this should only ever be used with
     * getTimeouts() return values. If people are using it by hand then there
     * might be something wrong with the API.
     */
    if(!is_array($arr)) {
      throw SagException('Expected an array and got something else.');
    }

    if(is_int($arr['open'])) {
      $this->setOpenTimeout($arr['open']);
    }

    if(is_int($arr['rwSeconds'])) {
      if(is_int($arr['rwMicroseconds'])) {
        $this->setRWTimeout($arr['rwSeconds'], $arr['rwMicroseconds']);
      }
      else {
        $this->setRWTimeout($arr['rwSeconds']);
      }
    }
  }
public function setTimeoutsFromArray($arr) {
    /*
     * Validation is lax in here because this should only ever be used with
     * getTimeouts() return values. If people are using it by hand then there
     * might be something wrong with the API.
     */
    if(!is_array($arr)) {
      throw SagException('Expected an array and got something else.');
    }

    if(is_int($arr['open'])) {
      $this->setOpenTimeout($arr['open']);
    }

    if(is_int($arr['rwSeconds'])) {
      if(is_int($arr['rwMicroseconds'])) {
        $this->setRWTimeout($arr['rwSeconds'], $arr['rwMicroseconds']);
      }
      else {
        $this->setRWTimeout($arr['rwSeconds']);
      }
    }
  }
public function setTimeoutsFromArray ( $ arr ) { /*
     * Validation is lax in here because this should only ever be used with
     * getTimeouts() return values. If people are using it by hand then there
     * might be something wrong with the API.
     */ if ( ! is_array ( $ arr ) ) { throw SagException ( 'Expected an array and got something else.' ) ; } if ( is_int ( $ arr [ 'open' ] ) ) { $ this -> setOpenTimeout ( $ arr [ 'open' ] ) ; } if ( is_int ( $ arr [ 'rwSeconds' ] ) ) { if ( is_int ( $ arr [ 'rwMicroseconds' ] ) ) { $ this -> setRWTimeout ( $ arr [ 'rwSeconds' ] , $ arr [ 'rwMicroseconds' ] ) ; } else { $ this -> setRWTimeout ( $ arr [ 'rwSeconds' ] ) ; } } }
A utility function that sets the different timeout values based on an
associative array.

@param array $arr An associative array with the keys 'open', 'rwSeconds',
and 'rwMicroseconds'.

@see getTimeouts()
A utility function that sets the different timeout values based on an associative array .