| 1 |
<?php |
| 2 |
|
| 3 |
namespace Hostinger\Admin\Jobs; |
| 4 |
|
| 5 |
use Hostinger\Admin\PluginSettings; |
| 6 |
use Hostinger\Admin\Proxy; |
| 7 |
use Hostinger\LlmsTxtGenerator\LlmsTxtFileHelper; |
| 8 |
use Hostinger\LlmsTxtGenerator\LlmsTxtParser; |
| 9 |
use Hostinger\Mcp\EventHandlerFactory; |
| 10 |
|
| 11 |
defined( 'ABSPATH' ) || exit; |
| 12 |
|
| 13 |
class JobInitializer { |
| 14 |
|
| 15 |
public function __construct( Proxy $proxy ) { |
| 16 |
$jobs = array(); |
| 17 |
$jobs[] = new NotifyMcpJob( new ActionScheduler(), new EventHandlerFactory( $proxy ) ); |
| 18 |
$jobs[] = new LlmsTxtInjectContentJob( new ActionScheduler(), new LlmsTxtParser(), new LlmsTxtFileHelper(), new PluginSettings() ); |
| 19 |
|
| 20 |
foreach ( $jobs as $job ) { |
| 21 |
$job->init(); |
| 22 |
} |
| 23 |
} |
| 24 |
} |
| 25 |
|