| 1 |
<?php |
| 2 |
|
| 3 |
namespace Yatra\Core; |
| 4 |
|
| 5 |
use Yatra\Core\API\TrackerAPI; |
| 6 |
use Yatra\Core\Hooks\BookingHooks; |
| 7 |
use Yatra\Core\Hooks\EmailHooks; |
| 8 |
use Yatra\Core\Hooks\NoticeHooks; |
| 9 |
use Yatra\Core\Hooks\TourHooks; |
| 10 |
|
| 11 |
class Initialize |
| 12 |
{ |
| 13 |
public static function run() |
| 14 |
{ |
| 15 |
require_once YATRA_ABSPATH . 'core/globals.php'; |
| 16 |
require_once YATRA_ABSPATH . 'core/functions/pages.php'; |
| 17 |
require_once YATRA_ABSPATH . 'core/functions/tour.php'; |
| 18 |
|
| 19 |
$self = new self; |
| 20 |
|
| 21 |
$self->api_init(); |
| 22 |
$self->cron_init(); |
| 23 |
$self->hooks_init(); |
| 24 |
} |
| 25 |
|
| 26 |
public function api_init() |
| 27 |
{ |
| 28 |
TrackerAPI::init(); |
| 29 |
} |
| 30 |
|
| 31 |
public function cron_init() |
| 32 |
{ |
| 33 |
Cron::init(); |
| 34 |
} |
| 35 |
|
| 36 |
public function hooks_init() |
| 37 |
{ |
| 38 |
TourHooks::init(); |
| 39 |
NoticeHooks::init(); |
| 40 |
EmailHooks::init(); |
| 41 |
BookingHooks::init(); |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
|