PluginProbe
Import WP – CSV & XML Import Export for WordPress / trunk
Import WP – CSV & XML Import Export for WordPress vtrunk
2.14.24 2.14.23 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.9.0 2.9.1 trunk 0.1.6 All 142 releases
jc-importer / class / ServiceProvider.php

ServiceProvider.php in Import WP – CSV & XML Import Export for WordPress trunk, at class/ServiceProvider.php

96 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace ImportWP;
4
5 use ImportWP\Common\Attachment\Attachment;
6 use ImportWP\Common\Compatibility\CompatibilityManager;
7 use ImportWP\Common\Filesystem\Filesystem;
8 use ImportWP\Common\Filesystem\ZipArchive;
9 use ImportWP\Common\Ftp\Ftp;
10 use ImportWP\Common\Http\Http;
11 use ImportWP\Common\Importer\Template\TemplateManager;
12 use ImportWP\Common\Properties\Properties;
13 use ImportWP\Common\Rest\RestManager;
14 use ImportWP\Common\UI\AdminNotices;
15 use ImportWP\Common\UI\ViewManager;
16 use ImportWP\Common\Util\Util;
17
18 class ServiceProvider
19 {
20 /**
21 * @var Properties
22 */
23 public $properties;
24 /**
25 * @var Filesystem
26 */
27 public $filesystem;
28 /**
29 * @var Attachment
30 */
31 public $attachment;
32 /**
33 * @var Ftp
34 */
35 public $ftp;
36 /**
37 * @var Http
38 */
39 public $http;
40 /**
41 * @var ViewManager
42 */
43 public $view_manager;
44 /**
45 * @var RestManager
46 */
47 public $rest_manager;
48
49 /**
50 * @var TemplateManager
51 */
52 protected $template_manager;
53
54 /**
55 * @var ZipArchive
56 */
57 protected $zip_archive;
58
59 /**
60 * @var Util
61 */
62 public $util;
63
64 /**
65 * @var AdminNotices
66 */
67 public $admin_notices;
68
69 /**
70 * @var CompatibilityManager
71 */
72 public $compatibility_manager;
73
74 public function __construct($event_handler)
75 {
76 $this->util = new Util();
77 $this->properties = new Properties();
78 $this->filesystem = new Filesystem($event_handler);
79 $this->attachment = new Attachment();
80 $this->ftp = new Ftp($this->filesystem);
81 $this->http = new Http($this->properties);
82
83 $this->view_manager = new ViewManager($this->properties);
84 $this->template_manager = new TemplateManager($event_handler);
85 $this->zip_archive = new ZipArchive();
86 $this->admin_notices = new AdminNotices();
87
88 $this->properties->mu_plugin_version = 2;
89 $this->properties->mu_plugin_dir = (defined('WPMU_PLUGIN_DIR') && defined('WPMU_PLUGIN_URL')) ? WPMU_PLUGIN_DIR : trailingslashit(WP_CONTENT_DIR) . 'mu-plugins';
90 $this->properties->mu_plugin_source = trailingslashit($this->properties->plugin_dir_path) . 'compatibility/importwp-compatibility.php';
91 $this->properties->mu_plugin_dest = trailingslashit($this->properties->mu_plugin_dir) . 'importwp-compatibility.php';
92
93 $this->compatibility_manager = new CompatibilityManager($this->properties, $this->filesystem);
94 }
95 }
96