16 lines
387 B
PHP
16 lines
387 B
PHP
|
<?php
|
||
|
|
||
|
namespace Controllers;
|
||
|
|
||
|
|
||
|
use BusinessLogic\Exceptions\InternalUseOnlyException;
|
||
|
use BusinessLogic\Helpers;
|
||
|
|
||
|
abstract class InternalApiController {
|
||
|
function checkForInternalUseOnly() {
|
||
|
$tokenHeader = Helpers::getHeader('X-AUTH-TOKEN');
|
||
|
if ($tokenHeader === null || trim($tokenHeader) === '') {
|
||
|
throw new InternalUseOnlyException();
|
||
|
}
|
||
|
}
|
||
|
}
|