mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-12 02:04:34 +00:00
ApiController visibility fix
This commit is contained in:
1 parent
5519d46ca2
commit
fe787163d0
1 file changed
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
class ApiController {
|
class ApiController {
|
||||||
private $input;
|
protected $input;
|
||||||
private $authenticated;
|
protected $authenticated;
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
$this->authenticated = false;
|
$this->authenticated = false;
|
||||||
@@ -17,7 +17,7 @@ class ApiController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function requireAuth(){
|
protected function requireAuth(){
|
||||||
if (isset($this->headers['HTTP_AUTHORIZATION'])) {
|
if (isset($this->headers['HTTP_AUTHORIZATION'])) {
|
||||||
// TODO: call appropriate class/method
|
// TODO: call appropriate class/method
|
||||||
$authManager = new AuthManager();
|
$authManager = new AuthManager();
|
||||||
@@ -30,7 +30,7 @@ class ApiController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function response($data = [], $httpCode = '200'){
|
protected function response($data = [], $httpCode = '200'){
|
||||||
http_response_code($httpCode);
|
http_response_code($httpCode);
|
||||||
echo json_encode($data);
|
echo json_encode($data);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user