original_string: public function process(DataTableInterface $dataTable)
      {
          // TODO: when calculating metrics before hand, only calculate for needed metrics, not all. NOTE:
          //       this is non-trivial since it will require, eg, to make sure processed metrics aren't added
          //       after pivotBy is handled.
          $dataTable = $this->applyPivotByFilter($dataTable);
          $dataTable = $this->applyTotalsCalculator($dataTable);
          $dataTable = $this->applyFlattener($dataTable);
  
          if ($this->callbackBeforeGenericFilters) {
              call_user_func($this->callbackBeforeGenericFilters, $dataTable);
          }
  
          $dataTable = $this->applyGenericFilters($dataTable);
          $this->applyComputeProcessedMetrics($dataTable);
  
          if ($this->callbackAfterGenericFilters) {
              call_user_func($this->callbackAfterGenericFilters, $dataTable);
          }
  
          // we automatically safe decode all datatable labels (against xss)
          $dataTable->queueFilter('SafeDecodeLabel');
          $dataTable = $this->convertSegmentValueToSegment($dataTable);
          $dataTable = $this->applyQueuedFilters($dataTable);
          $dataTable = $this->applyRequestedColumnDeletion($dataTable);
          $dataTable = $this->applyLabelFilter($dataTable);
          $dataTable = $this->applyMetricsFormatting($dataTable);
          return $dataTable;
      }
code: public function process(DataTableInterface $dataTable)
      {
          // TODO: when calculating metrics before hand, only calculate for needed metrics, not all. NOTE:
          //       this is non-trivial since it will require, eg, to make sure processed metrics aren't added
          //       after pivotBy is handled.
          $dataTable = $this->applyPivotByFilter($dataTable);
          $dataTable = $this->applyTotalsCalculator($dataTable);
          $dataTable = $this->applyFlattener($dataTable);
  
          if ($this->callbackBeforeGenericFilters) {
              call_user_func($this->callbackBeforeGenericFilters, $dataTable);
          }
  
          $dataTable = $this->applyGenericFilters($dataTable);
          $this->applyComputeProcessedMetrics($dataTable);
  
          if ($this->callbackAfterGenericFilters) {
              call_user_func($this->callbackAfterGenericFilters, $dataTable);
          }
  
          // we automatically safe decode all datatable labels (against xss)
          $dataTable->queueFilter('SafeDecodeLabel');
          $dataTable = $this->convertSegmentValueToSegment($dataTable);
          $dataTable = $this->applyQueuedFilters($dataTable);
          $dataTable = $this->applyRequestedColumnDeletion($dataTable);
          $dataTable = $this->applyLabelFilter($dataTable);
          $dataTable = $this->applyMetricsFormatting($dataTable);
          return $dataTable;
      }
code_tokens: public function process ( DataTableInterface $ dataTable ) { // TODO: when calculating metrics before hand, only calculate for needed metrics, not all. NOTE: //       this is non-trivial since it will require, eg, to make sure processed metrics aren't added //       after pivotBy is handled. $ dataTable = $ this -> applyPivotByFilter ( $ dataTable ) ; $ dataTable = $ this -> applyTotalsCalculator ( $ dataTable ) ; $ dataTable = $ this -> applyFlattener ( $ dataTable ) ; if ( $ this -> callbackBeforeGenericFilters ) { call_user_func ( $ this -> callbackBeforeGenericFilters , $ dataTable ) ; } $ dataTable = $ this -> applyGenericFilters ( $ dataTable ) ; $ this -> applyComputeProcessedMetrics ( $ dataTable ) ; if ( $ this -> callbackAfterGenericFilters ) { call_user_func ( $ this -> callbackAfterGenericFilters , $ dataTable ) ; } // we automatically safe decode all datatable labels (against xss) $ dataTable -> queueFilter ( 'SafeDecodeLabel' ) ; $ dataTable = $ this -> convertSegmentValueToSegment ( $ dataTable ) ; $ dataTable = $ this -> applyQueuedFilters ( $ dataTable ) ; $ dataTable = $ this -> applyRequestedColumnDeletion ( $ dataTable ) ; $ dataTable = $ this -> applyLabelFilter ( $ dataTable ) ; $ dataTable = $ this -> applyMetricsFormatting ( $ dataTable ) ; return $ dataTable ; }
docstring: Apply post-processing logic to a DataTable of a report for an API request.
  
  @param DataTableInterface $dataTable The data table to process.
  @return DataTableInterface A new data table.
docstring_tokens: Apply post - processing logic to a DataTable of a report for an API request .