| 1 |
<?php |
| 2 |
|
| 3 |
namespace ImportWP\Common\Importer; |
| 4 |
|
| 5 |
use ImportWP\Common\Model\ImporterModel; |
| 6 |
|
| 7 |
interface TemplateInterface |
| 8 |
{ |
| 9 |
public function register(); |
| 10 |
public function register_settings(); |
| 11 |
public function register_options(); |
| 12 |
public function get_permission_fields($importer_model); |
| 13 |
|
| 14 |
/** |
| 15 |
* Process data before record is importer. |
| 16 |
* |
| 17 |
* Alter data that is passed to the mapper. |
| 18 |
* |
| 19 |
* @param ParsedData $data |
| 20 |
* @return ParsedData |
| 21 |
*/ |
| 22 |
public function pre_process(ParsedData $data); |
| 23 |
|
| 24 |
/** |
| 25 |
* Process data after record is imported, but before custom fields. |
| 26 |
* |
| 27 |
* Use data that is returned from the mapper. |
| 28 |
* |
| 29 |
* @param int $post_id |
| 30 |
* @param ParsedData $data |
| 31 |
* @param ImporterModel $importer_model |
| 32 |
* @return ParsedData |
| 33 |
*/ |
| 34 |
public function process($post_id, ParsedData $data, ImporterModel $importer_model); |
| 35 |
|
| 36 |
/** |
| 37 |
* Process data after record is importer. |
| 38 |
* |
| 39 |
* Use data that is returned from the mapper. |
| 40 |
* |
| 41 |
* @param int $post_id |
| 42 |
* @param ParsedData $data |
| 43 |
* @return void |
| 44 |
*/ |
| 45 |
public function post_process($post_id, ParsedData $data); |
| 46 |
} |
| 47 |
|