original_string: public function setShape($value, $replace = true)
      {
          $name = 'shapes';
          if (!(is_array($value) || is_string($value))) {
              throw new CPS_Exception(array(array('long_message' => 'Invalid request parameter', 'code' => ERROR_CODE_INVALID_PARAMETER, 'level' => 'REJECTED', 'source' => 'CPS_API')));
          }
          if ($replace) {
              $this->_setRawParam($name, $value);
          } else {
              $exParam = $this->_getRawParam($name);
              if (!is_array($exParam)) {
                  $exParam = array($exParam);
              }
              if (is_array($value)) {
                  foreach($value as $val){
                      $exParam[] = $val;
                  }
              } else if (is_string($value)) {
                  $exParam[] = $value;
              }
              $this->_setRawParam($name, $exParam);
          }
      }
code: public function setShape($value, $replace = true)
      {
          $name = 'shapes';
          if (!(is_array($value) || is_string($value))) {
              throw new CPS_Exception(array(array('long_message' => 'Invalid request parameter', 'code' => ERROR_CODE_INVALID_PARAMETER, 'level' => 'REJECTED', 'source' => 'CPS_API')));
          }
          if ($replace) {
              $this->_setRawParam($name, $value);
          } else {
              $exParam = $this->_getRawParam($name);
              if (!is_array($exParam)) {
                  $exParam = array($exParam);
              }
              if (is_array($value)) {
                  foreach($value as $val){
                      $exParam[] = $val;
                  }
              } else if (is_string($value)) {
                  $exParam[] = $value;
              }
              $this->_setRawParam($name, $exParam);
          }
      }
code_tokens: public function setShape ( $ value , $ replace = true ) { $ name = 'shapes' ; if ( ! ( is_array ( $ value ) || is_string ( $ value ) ) ) { throw new CPS_Exception ( array ( array ( 'long_message' => 'Invalid request parameter' , 'code' => ERROR_CODE_INVALID_PARAMETER , 'level' => 'REJECTED' , 'source' => 'CPS_API' ) ) ) ; } if ( $ replace ) { $ this -> _setRawParam ( $ name , $ value ) ; } else { $ exParam = $ this -> _getRawParam ( $ name ) ; if ( ! is_array ( $ exParam ) ) { $ exParam = array ( $ exParam ) ; } if ( is_array ( $ value ) ) { foreach ( $ value as $ val ) { $ exParam [ ] = $ val ; } } else if ( is_string ( $ value ) ) { $ exParam [ ] = $ value ; } $ this -> _setRawParam ( $ name , $ exParam ) ; } }
docstring: Sets shape definition for geospatial search
  @param String|array $value A single shape definition as string or array of string that define multiple shapes
  @param bool $replace Should previous set values be replaced
docstring_tokens: Sets shape definition for geospatial search