feat: allow starting session from extenders
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user