Task/Collect.php
public function getJobList() {
    $job_list = [];

    foreach ($this->collectorClassNames as $collector_class_name) {
      // Get the list of jobs from each collector.
      $collector_helper = $this->getHelper($collector_class_name);
      $collector_job_list = $collector_helper->getJobList();

      if (is_null($collector_job_list)) {
        // Collector doesn't support jobs: create just a single job for it.
        $job_list[] = [
          'collector' => $collector_class_name,
          'process_label' => $collector_helper->getReportingKey(),
          // A singleton job is by definition the last one.
          // Simpler to do this and have the analysis waste time trying to load
          // a temporary file than add special handling for singleton jobs.
          'last' => TRUE,
        ];
      }
      else {
        array_walk($collector_job_list, function(&$item) use ($collector_class_name) {
          $item['collector'] = $collector_class_name;
        });

        // Mark the final one so we know when to write the data to the
        // permanent location.
        $keys = array_keys($collector_job_list);
        $last_index = end($keys);
        $collector_job_list[$last_index]['last'] = TRUE;

        $job_list = array_merge($job_list, $collector_job_list);
      }
    }

    return $job_list;
  }
public function getJobList() {
    $job_list = [];

    foreach ($this->collectorClassNames as $collector_class_name) {
      // Get the list of jobs from each collector.
      $collector_helper = $this->getHelper($collector_class_name);
      $collector_job_list = $collector_helper->getJobList();

      if (is_null($collector_job_list)) {
        // Collector doesn't support jobs: create just a single job for it.
        $job_list[] = [
          'collector' => $collector_class_name,
          'process_label' => $collector_helper->getReportingKey(),
          // A singleton job is by definition the last one.
          // Simpler to do this and have the analysis waste time trying to load
          // a temporary file than add special handling for singleton jobs.
          'last' => TRUE,
        ];
      }
      else {
        array_walk($collector_job_list, function(&$item) use ($collector_class_name) {
          $item['collector'] = $collector_class_name;
        });

        // Mark the final one so we know when to write the data to the
        // permanent location.
        $keys = array_keys($collector_job_list);
        $last_index = end($keys);
        $collector_job_list[$last_index]['last'] = TRUE;

        $job_list = array_merge($job_list, $collector_job_list);
      }
    }

    return $job_list;
  }
public function getJobList ( ) { $ job_list = [ ] ; foreach ( $ this -> collectorClassNames as $ collector_class_name ) { // Get the list of jobs from each collector. $ collector_helper = $ this -> getHelper ( $ collector_class_name ) ; $ collector_job_list = $ collector_helper -> getJobList ( ) ; if ( is_null ( $ collector_job_list ) ) { // Collector doesn't support jobs: create just a single job for it. $ job_list [ ] = [ 'collector' => $ collector_class_name , 'process_label' => $ collector_helper -> getReportingKey ( ) , // A singleton job is by definition the last one. // Simpler to do this and have the analysis waste time trying to load // a temporary file than add special handling for singleton jobs. 'last' => TRUE , ] ; } else { array_walk ( $ collector_job_list , function ( & $ item ) use ( $ collector_class_name ) { $ item [ 'collector' ] = $ collector_class_name ; } ) ; // Mark the final one so we know when to write the data to the // permanent location. $ keys = array_keys ( $ collector_job_list ) ; $ last_index = end ( $ keys ) ; $ collector_job_list [ $ last_index ] [ 'last' ] = TRUE ; $ job_list = array_merge ( $ job_list , $ collector_job_list ) ; } } return $ job_list ; }
Get the list of analysis jobs, to use for incremental analysis.

@return array
A numeric array of jobs. Each job is itself an array, whose details are
internal except for the following keys:
- 'process_label': A human-readable string describing the process being
run. This should be the same for each job from a particular collector.
- 'item_label': A human-readable string for the particular item. This
will be empty if the process has only a single job.
Get the list of analysis jobs to use for incremental analysis .