webCOMAND

io_comand_io\importer

Import content from JSON and CSV files into a COMAND repository.

Example

// import objects from a CSV or JSON file
$repo = comand::repo();
$url = 'http://www.comandmarket.com/packages/com_presidentsdemo_www/install/presidents.js';
$num = \io_comand_io\importer::import_from_file($url);
echo("Imported $num objects.\n");

Methods

  • Constructor
  • get_file_format()
  • import()
  • import_from_csv()
  • import_from_file()
  • import_from_json()
  • set_container()
  • read_from_url()
  • validate()

Properties

  • repo
  • options
  • container
  • field
  • force_container
  • log
  • url
  • last_error
  • validation_data
  • imported_data