| 1 |
<?php |
| 2 |
namespace HelloPlus\Modules\Admin\Components; |
| 3 |
|
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; // Exit if accessed directly. |
| 6 |
} |
| 7 |
|
| 8 |
use Elementor\WPNotificationsPackage\V110\Notifications as Notifications_SDK; |
| 9 |
|
| 10 |
class Notificator { |
| 11 |
private ?Notifications_SDK $notificator = null; |
| 12 |
|
| 13 |
public function get_notifications_by_conditions( $force_request = false ) { |
| 14 |
return $this->notificator->get_notifications_by_conditions( $force_request ); |
| 15 |
} |
| 16 |
|
| 17 |
public function __construct() { |
| 18 |
if ( ! class_exists( 'Elementor\WPNotificationsPackage\V110\Notifications' ) ) { |
| 19 |
require_once HELLOPLUS_PATH . '/vendor/autoload.php'; |
| 20 |
} |
| 21 |
|
| 22 |
$this->notificator = new Notifications_SDK( |
| 23 |
'hello-plus', |
| 24 |
HELLOPLUS_VERSION, |
| 25 |
'ehp' |
| 26 |
); |
| 27 |
} |
| 28 |
} |
| 29 |
|