| 1 |
<?php |
| 2 |
|
| 3 |
namespace ImportWP\Common\Importer\Template; |
| 4 |
|
| 5 |
use ImportWP\EventHandler; |
| 6 |
|
| 7 |
class TemplateManager |
| 8 |
{ |
| 9 |
/** |
| 10 |
* @var EventHandler |
| 11 |
*/ |
| 12 |
protected $event_handler; |
| 13 |
|
| 14 |
public function __construct(EventHandler $event_handler) |
| 15 |
{ |
| 16 |
$this->event_handler = $event_handler; |
| 17 |
} |
| 18 |
|
| 19 |
public function load_template($name) |
| 20 |
{ |
| 21 |
$template = new $name($this->event_handler); |
| 22 |
return $template; |
| 23 |
} |
| 24 |
} |
| 25 |
|