original_string: public function getResponse($value = null, $apiModule = false, $apiMethod = false)
      {
          $this->apiModule = $apiModule;
          $this->apiMethod = $apiMethod;
  
          $this->sendHeaderIfEnabled();
  
          // when null or void is returned from the api call, we handle it as a successful operation
          if (!isset($value)) {
              if (ob_get_contents()) {
                  return null;
              }
  
              return $this->apiRenderer->renderSuccess('ok');
          }
  
          // If the returned value is an object DataTable we
          // apply the set of generic filters if asked in the URL
          // and we render the DataTable according to the format specified in the URL
          if ($value instanceof DataTableInterface) {
              return $this->handleDataTable($value);
          }
  
          // Case an array is returned from the API call, we convert it to the requested format
          // - if calling from inside the application (format = original)
          //    => the data stays unchanged (ie. a standard php array or whatever data structure)
          // - if any other format is requested, we have to convert this data structure (which we assume
          //   to be an array) to a DataTable in order to apply the requested DataTable_Renderer (for example XML)
          if (is_array($value)) {
              return $this->handleArray($value);
          }
  
          if (is_object($value)) {
              return $this->apiRenderer->renderObject($value);
          }
  
          if (is_resource($value)) {
              return $this->apiRenderer->renderResource($value);
          }
  
          return $this->apiRenderer->renderScalar($value);
      }
code: public function getResponse($value = null, $apiModule = false, $apiMethod = false)
      {
          $this->apiModule = $apiModule;
          $this->apiMethod = $apiMethod;
  
          $this->sendHeaderIfEnabled();
  
          // when null or void is returned from the api call, we handle it as a successful operation
          if (!isset($value)) {
              if (ob_get_contents()) {
                  return null;
              }
  
              return $this->apiRenderer->renderSuccess('ok');
          }
  
          // If the returned value is an object DataTable we
          // apply the set of generic filters if asked in the URL
          // and we render the DataTable according to the format specified in the URL
          if ($value instanceof DataTableInterface) {
              return $this->handleDataTable($value);
          }
  
          // Case an array is returned from the API call, we convert it to the requested format
          // - if calling from inside the application (format = original)
          //    => the data stays unchanged (ie. a standard php array or whatever data structure)
          // - if any other format is requested, we have to convert this data structure (which we assume
          //   to be an array) to a DataTable in order to apply the requested DataTable_Renderer (for example XML)
          if (is_array($value)) {
              return $this->handleArray($value);
          }
  
          if (is_object($value)) {
              return $this->apiRenderer->renderObject($value);
          }
  
          if (is_resource($value)) {
              return $this->apiRenderer->renderResource($value);
          }
  
          return $this->apiRenderer->renderScalar($value);
      }
code_tokens: public function getResponse ( $ value = null , $ apiModule = false , $ apiMethod = false ) { $ this -> apiModule = $ apiModule ; $ this -> apiMethod = $ apiMethod ; $ this -> sendHeaderIfEnabled ( ) ; // when null or void is returned from the api call, we handle it as a successful operation if ( ! isset ( $ value ) ) { if ( ob_get_contents ( ) ) { return null ; } return $ this -> apiRenderer -> renderSuccess ( 'ok' ) ; } // If the returned value is an object DataTable we // apply the set of generic filters if asked in the URL // and we render the DataTable according to the format specified in the URL if ( $ value instanceof DataTableInterface ) { return $ this -> handleDataTable ( $ value ) ; } // Case an array is returned from the API call, we convert it to the requested format // - if calling from inside the application (format = original) //    => the data stays unchanged (ie. a standard php array or whatever data structure) // - if any other format is requested, we have to convert this data structure (which we assume //   to be an array) to a DataTable in order to apply the requested DataTable_Renderer (for example XML) if ( is_array ( $ value ) ) { return $ this -> handleArray ( $ value ) ; } if ( is_object ( $ value ) ) { return $ this -> apiRenderer -> renderObject ( $ value ) ; } if ( is_resource ( $ value ) ) { return $ this -> apiRenderer -> renderResource ( $ value ) ; } return $ this -> apiRenderer -> renderScalar ( $ value ) ; }
docstring: This method processes the data resulting from the API call.
  
  - If the data resulted from the API call is a DataTable then
  - we apply the standard filters if the parameters have been found
  in the URL. For example to offset,limit the Table you can add the following parameters to any API
  call that returns a DataTable: filter_limit=10&filter_offset=20
  - we apply the filters that have been previously queued on the DataTable
  @see DataTable::queueFilter()
  - we apply the renderer that generate the DataTable in a given format (XML, PHP, HTML, JSON, etc.)
  the format can be changed using the 'format' parameter in the request.
  Example: format=xml
  
  - If there is nothing returned (void) we display a standard success message
  
  - If there is a PHP array returned, we try to convert it to a dataTable
  It is then possible to convert this datatable to any requested format (xml/etc)
  
  - If a bool is returned we convert to a string (true is displayed as 'true' false as 'false')
  
  - If an integer / float is returned, we simply return it
  
  @param mixed $value The initial returned value, before post process. If set to null, success response is returned.
  @param bool|string $apiModule The API module that was called
  @param bool|string $apiMethod The API method that was called
  @return mixed  Usually a string, but can still be a PHP data structure if the format requested is 'original'
docstring_tokens: This method processes the data resulting from the API call .