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.
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Controllers;
|
|
|
|
|
|
|
|
|
|
|
|
use BusinessLogic\Exceptions\InternalUseOnlyException;
|
|
|
|
use BusinessLogic\Helpers;
|
|
|
|
|
|
|
|
abstract class InternalApiController {
|
|
|
|
static function staticCheckForInternalUseOnly() {
|
|
|
|
$tokenHeader = Helpers::getHeader('X-AUTH-TOKEN');
|
|
|
|
if ($tokenHeader !== null && trim($tokenHeader) !== '') {
|
|
|
|
throw new InternalUseOnlyException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function checkForInternalUseOnly() {
|
|
|
|
$tokenHeader = Helpers::getHeader('X-AUTH-TOKEN');
|
|
|
|
if ($tokenHeader !== null && trim($tokenHeader) !== '') {
|
|
|
|
throw new InternalUseOnlyException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|