original_string: protected function sendBackgroundEncodedFormElementsByPost($urlToSendTo, $params = [])
      {
          $postingUrl = filter_var($urlToSendTo, FILTER_VALIDATE_URL);
          if ($postingUrl === false) {
              throw new \Exception('Invalid URL in ' . __FUNCTION__);
          }
          if ($params !== []) {
              $cntFailErrMsg = $this->lclMsgCmn('i18n_Error_FailedToConnect');
              $this->sendBackgroundPostData($postingUrl, $params, $cntFailErrMsg);
              return '';
          }
          throw new \Exception($this->lclMsgCmn('i18n_Error_GivenParameterIsNotAnArray'));
      }
code: protected function sendBackgroundEncodedFormElementsByPost($urlToSendTo, $params = [])
      {
          $postingUrl = filter_var($urlToSendTo, FILTER_VALIDATE_URL);
          if ($postingUrl === false) {
              throw new \Exception('Invalid URL in ' . __FUNCTION__);
          }
          if ($params !== []) {
              $cntFailErrMsg = $this->lclMsgCmn('i18n_Error_FailedToConnect');
              $this->sendBackgroundPostData($postingUrl, $params, $cntFailErrMsg);
              return '';
          }
          throw new \Exception($this->lclMsgCmn('i18n_Error_GivenParameterIsNotAnArray'));
      }
code_tokens: protected function sendBackgroundEncodedFormElementsByPost ( $ urlToSendTo , $ params = [ ] ) { $ postingUrl = filter_var ( $ urlToSendTo , FILTER_VALIDATE_URL ) ; if ( $ postingUrl === false ) { throw new \ Exception ( 'Invalid URL in ' . __FUNCTION__ ) ; } if ( $ params !== [ ] ) { $ cntFailErrMsg = $ this -> lclMsgCmn ( 'i18n_Error_FailedToConnect' ) ; $ this -> sendBackgroundPostData ( $ postingUrl , $ params , $ cntFailErrMsg ) ; return '' ; } throw new \ Exception ( $ this -> lclMsgCmn ( 'i18n_Error_GivenParameterIsNotAnArray' ) ) ; }
docstring: Send an array of parameters like a form through a POST action
  
  @param string $urlToSendTo
  @param array $params
  @throws \Exception
docstring_tokens: Send an array of parameters like a form through a POST action