You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
576 B
PHP
21 lines
576 B
PHP
<?php
|
|
|
|
namespace BusinessLogic\Settings;
|
|
|
|
|
|
use DataAccess\Settings\ModsForHeskSettingsGateway;
|
|
|
|
class ApiChecker {
|
|
/* @var $modsForHeskSettingsGateway ModsForHeskSettingsGateway */
|
|
private $modsForHeskSettingsGateway;
|
|
|
|
function __construct($modsForHeskSettingsGateway) {
|
|
$this->modsForHeskSettingsGateway = $modsForHeskSettingsGateway;
|
|
}
|
|
|
|
function isApiEnabled($heskSettings) {
|
|
$modsForHeskSettings = $this->modsForHeskSettingsGateway->getAllSettings($heskSettings);
|
|
|
|
return intval($modsForHeskSettings['public_api']) === 1;
|
|
}
|
|
} |