ImportWP.php in Import WP – CSV & XML Import Export for WordPress 2.7.14, at class/ImportWP.php
| 1 | <?php |
| 2 | |
| 3 | namespace ImportWP; |
| 4 | |
| 5 | use ImportWP\Common\Rest\RestManager; |
| 6 | |
| 7 | class ImportWP |
| 8 | { |
| 9 | /** |
| 10 | * @var RestManager |
| 11 | */ |
| 12 | private $rest_manager; |
| 13 | |
| 14 | public function __construct($is_pro = false) |
| 15 | { |
| 16 | $container = Container::getInstance(); |
| 17 | |
| 18 | $container->setupServiceProviders($is_pro); |
| 19 | |
| 20 | $this->rest_manager = $container->get('rest_manager'); |
| 21 | } |
| 22 | |
| 23 | public function register() |
| 24 | { |
| 25 | if ($this->rest_manager) { |
| 26 | $this->rest_manager->register(); |
| 27 | } |
| 28 | } |
| 29 | } |
| 30 |