feat: allow starting session from extenders
This commit is contained in:
@@ -69,6 +69,12 @@ abstract class WebService
|
|||||||
$renderer->render($this->status, $data);
|
$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
|
* Determines which method to call based on GET or POST parameters and
|
||||||
* call it before returning the result.
|
* call it before returning the result.
|
||||||
@@ -80,8 +86,7 @@ abstract class WebService
|
|||||||
private function call($sendSession = true)
|
private function call($sendSession = true)
|
||||||
{
|
{
|
||||||
if ($sendSession) {
|
if ($sendSession) {
|
||||||
session_save_path(Configuration::get('session.save_path'));
|
$this->startSession();
|
||||||
session_start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = empty($_GET) ? $_POST : $_GET;
|
$params = empty($_GET) ? $_POST : $_GET;
|
||||||
|
|||||||
Reference in New Issue
Block a user