Ei kuvausta

class-wc-importer-interface.php 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * WooCommerce Importer Interface
  4. *
  5. * @package WooCommerce\Interface
  6. * @version 3.1.0
  7. */
  8. /**
  9. * WC_Importer_Interface class.
  10. */
  11. interface WC_Importer_Interface {
  12. /**
  13. * Process importation.
  14. * Returns an array with the imported and failed items.
  15. * 'imported' contains a list of IDs.
  16. * 'failed' contains a list of WP_Error objects.
  17. *
  18. * Example:
  19. * ['imported' => [], 'failed' => []]
  20. *
  21. * @return array
  22. */
  23. public function import();
  24. /**
  25. * Get file raw keys.
  26. *
  27. * CSV - Headers.
  28. * XML - Element names.
  29. * JSON - Keys
  30. *
  31. * @return array
  32. */
  33. public function get_raw_keys();
  34. /**
  35. * Get file mapped headers.
  36. *
  37. * @return array
  38. */
  39. public function get_mapped_keys();
  40. /**
  41. * Get raw data.
  42. *
  43. * @return array
  44. */
  45. public function get_raw_data();
  46. /**
  47. * Get parsed data.
  48. *
  49. * @return array
  50. */
  51. public function get_parsed_data();
  52. /**
  53. * Get file pointer position from the last read.
  54. *
  55. * @return int
  56. */
  57. public function get_file_position();
  58. /**
  59. * Get file pointer position as a percentage of file size.
  60. *
  61. * @return int
  62. */
  63. public function get_percent_complete();
  64. }