|
|
|
@ -10,6 +10,16 @@ Class Controller {
@@ -10,6 +10,16 @@ Class Controller {
|
|
|
|
|
if (!empty(FSC::$app['config']['default_layout'])) { |
|
|
|
|
$this->layout = FSC::$app['config']['default_layout']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//json body auto serialization to $_POST |
|
|
|
|
try { |
|
|
|
|
$json = file_get_contents('php://input'); |
|
|
|
|
$jsonData = json_decode($json, true); |
|
|
|
|
|
|
|
|
|
if (!empty($jsonData)) { |
|
|
|
|
$_POST = array_merge($_POST, $jsonData); |
|
|
|
|
} |
|
|
|
|
}catch(Exception $e) {} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function __destruct() { |
|
|
|
|