| 1 | <?php |
||
| 15 | class WordPoints_Importer_Mock extends WordPoints_Importer { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @since 1.0.0 |
||
| 19 | */ |
||
| 20 | public $components; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * The "imports" performed. |
||
| 24 | * |
||
| 25 | * @since 1.0.0 |
||
| 26 | * |
||
| 27 | * @var array |
||
| 28 | */ |
||
| 29 | public $imports = array(); |
||
| 30 | |||
| 31 | /** |
||
| 32 | * The "imports" for that were checked for possible performance. |
||
| 33 | * |
||
| 34 | * @since 1.0.0 |
||
| 35 | * |
||
| 36 | * @var array |
||
| 37 | */ |
||
| 38 | public $can_imports; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Whether this importer is available. |
||
| 42 | * |
||
| 43 | * @since 1.0.0 |
||
| 44 | * |
||
| 45 | * @var true|WP_Error |
||
| 46 | */ |
||
| 47 | public $is_available = true; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @since 1.0.0 |
||
| 51 | */ |
||
| 52 | public function is_available() { |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Mock an import method. |
||
| 58 | * |
||
| 59 | * @since 1.0.0 |
||
| 60 | * |
||
| 61 | * @param array $settings The settings for this "component". |
||
| 62 | */ |
||
| 63 | public function do_an_import( $settings ) { |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Mock a can_import method. |
||
| 70 | * |
||
| 71 | * @since 1.0.0 |
||
| 72 | * |
||
| 73 | * @param array $settings The settings for this "component". |
||
| 74 | * |
||
| 75 | * @return true |
||
| 76 | */ |
||
| 77 | public function can_import( $settings ) { |
||
| 83 | |||
| 84 | /** |
||
| 85 | * Return a WP_Error because we can't do the import for an option. |
||
| 86 | * |
||
| 87 | * @since 1.0.0 |
||
| 88 | * |
||
| 89 | * @param array $settings The settings for this "component". |
||
| 90 | * |
||
| 91 | * @return WP_Error An error. |
||
| 92 | */ |
||
| 93 | public function cant_import( $settings ) { |
||
| 99 | } |
||
| 100 | |||
| 102 |