feat: allow starting session from extenders

master
gbili 5 years ago
parent 1720f8c8da
commit a8813bc325

@ -69,6 +69,12 @@ abstract class WebService
$renderer->render($this->status, $data);
}
protected function startSession()
{
session_save_path(Configuration::get('session.save_path'));
session_start();
}
/**
* Determines which method to call based on GET or POST parameters and
* call it before returning the result.
@ -80,8 +86,7 @@ abstract class WebService
private function call($sendSession = true)
{
if ($sendSession) {
session_save_path(Configuration::get('session.save_path'));
session_start();
$this->startSession();
}
$params = empty($_GET) ? $_POST : $_GET;

Loading…
Cancel
Save