You are here

interface ParserInterface in CSV Importer 8

Csv parser manager interface.

Hierarchy

Expanded class hierarchy of ParserInterface

All classes that implement ParserInterface

1 file declares its use of ParserInterface
ImporterForm.php in src/Form/ImporterForm.php

File

src/ParserInterface.php, line 8

Namespace

Drupal\csv_importer
View source
interface ParserInterface {

  /**
   * Get CSV by id.
   *
   * @param int $id
   *   CSV id.
   * @param string $delimiter
   *   CSV delimiter.
   *
   * @return array|null
   *   Parsed CSV.
   */
  public function getCsvById(int $id, string $delimiter);

  /**
   * Get CSV column (first row).
   *
   * @param int $id
   *   CSV id.
   *
   * @return array|null
   *   CSV field names.
   */
  public function getCsvFieldsById(int $id);

  /**
   * Load CSV.
   *
   * @param int $id
   *   CSV id.
   *
   * @return \Drupal\file\Entity\File|null
   *   Entity object.
   */
  public function getCsvEntity(int $id);

}

Members

Namesort descending Modifiers Type Description Overrides
ParserInterface::getCsvById public function Get CSV by id. 1
ParserInterface::getCsvEntity public function Load CSV. 1
ParserInterface::getCsvFieldsById public function Get CSV column (first row). 1