You are here

public function GetServices::simpleNodeImporterGetAllColumnHeaders in Simple Node Importer 8

File

src/Services/GetServices.php, line 107

Class

GetServices

Namespace

Drupal\simple_node_importer\Services

Code

public function simpleNodeImporterGetAllColumnHeaders($fileuri) {
  $handle = fopen($fileuri, 'r');
  $row = fgetcsv($handle);
  foreach ($row as $value) {

    // code...
    $key = strtolower(preg_replace('/\\s+/', '_', $value));
    $column[$key] = $value;
  }
  return $column;
}