| 1 |
<?php |
| 2 |
|
| 3 |
namespace ImportWP; |
| 4 |
|
| 5 |
use ImportWP\Common\Attachment\Attachment; |
| 6 |
use ImportWP\Common\Filesystem\Filesystem; |
| 7 |
use ImportWP\Common\Ftp\Ftp; |
| 8 |
use ImportWP\Common\Http\Http; |
| 9 |
use ImportWP\Common\Importer\Template\TemplateManager; |
| 10 |
use ImportWP\Common\Properties\Properties; |
| 11 |
use ImportWP\Common\Rest\RestManager; |
| 12 |
use ImportWP\Common\UI\ViewManager; |
| 13 |
use ImportWP\Common\Util\Util; |
| 14 |
|
| 15 |
class ServiceProvider |
| 16 |
{ |
| 17 |
/** |
| 18 |
* @var Properties |
| 19 |
*/ |
| 20 |
public $properties; |
| 21 |
/** |
| 22 |
* @var Filesystem |
| 23 |
*/ |
| 24 |
public $filesystem; |
| 25 |
/** |
| 26 |
* @var Attachment |
| 27 |
*/ |
| 28 |
public $attachment; |
| 29 |
/** |
| 30 |
* @var Ftp |
| 31 |
*/ |
| 32 |
public $ftp; |
| 33 |
/** |
| 34 |
* @var Http |
| 35 |
*/ |
| 36 |
public $http; |
| 37 |
/** |
| 38 |
* @var ViewManager |
| 39 |
*/ |
| 40 |
public $view_manager; |
| 41 |
/** |
| 42 |
* @var RestManager |
| 43 |
*/ |
| 44 |
public $rest_manager; |
| 45 |
|
| 46 |
/** |
| 47 |
* @var TemplateManager |
| 48 |
*/ |
| 49 |
protected $template_manager; |
| 50 |
|
| 51 |
/** |
| 52 |
* @var Util |
| 53 |
*/ |
| 54 |
public $util; |
| 55 |
|
| 56 |
public function __construct($event_handler) |
| 57 |
{ |
| 58 |
$this->util = new Util(); |
| 59 |
$this->properties = new Properties(); |
| 60 |
$this->filesystem = new Filesystem($event_handler); |
| 61 |
$this->attachment = new Attachment(); |
| 62 |
$this->ftp = new Ftp($this->filesystem); |
| 63 |
$this->http = new Http($this->properties); |
| 64 |
|
| 65 |
$this->view_manager = new ViewManager($this->properties); |
| 66 |
$this->template_manager = new TemplateManager($event_handler); |
| 67 |
} |
| 68 |
} |
| 69 |
|