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.
23 lines
481 B
PHTML
23 lines
481 B
PHTML
7 years ago
|
<?php
|
||
|
|
||
7 years ago
|
namespace BusinessLogic;
|
||
7 years ago
|
|
||
|
|
||
|
class Helpers {
|
||
|
static function getHeader($key) {
|
||
|
$headers = getallheaders();
|
||
|
|
||
|
$uppercaseHeaders = array();
|
||
|
foreach ($headers as $header => $value) {
|
||
|
$uppercaseHeaders[strtoupper($header)] = $value;
|
||
|
}
|
||
|
|
||
|
return isset($uppercaseHeaders[$key])
|
||
|
? $uppercaseHeaders[$key]
|
||
|
: NULL;
|
||
|
}
|
||
|
|
||
|
static function hashToken($token) {
|
||
|
return hash('sha512', $token);
|
||
|
}
|
||
|
}
|