You are here

public static function GdprTasksSarWorker::readCsv in General Data Protection Regulation 7

Read data from a CSV file.

Parameters

string $filename: The filename to read from (supports streams).

Return value

array CSV file data.

1 call to GdprTasksSarWorker::readCsv()
GdprTasksSarWorker::compile in modules/gdpr_tasks/src/Plugin/QueueWorker/GdprTasksSarWorker.php
Compile the SAR into a downloadable zip.

File

modules/gdpr_tasks/src/Plugin/QueueWorker/GdprTasksSarWorker.php, line 229

Class

GdprTasksSarWorker
Queue worker callback for processing SARs requests.

Code

public static function readCsv($filename) {
  $data = array();
  $handle = fopen($filename, 'r');
  while (!feof($handle)) {
    $data[] = fgetcsv($handle);
  }
  fclose($handle);
  return $data;
}