12345678910111213141516171819202122232425262728293031 |
- <?php
- require_once('request.php');
- class arkiwiRequestGetClose extends arkiwiRequest
- {
- private $sId = null;
- public function __construct($ak) {
- parent::__construct($ak);
- $extra = $this->getRequestExtra();
-
- $this->sId = $extra[0];
- }
- public function run() {
- if($this->request['method'] != 'GET') {
- $this->setBodyError(500, "arkiwiRequestGetClose: GET method required.");
- return;
- }
- if (!$this->isValid($this->sId)) {
- $this->setBodyError(400, "Session invalid or expired.");
- return;
- }
- $this->close($this->sId);
- $this->setCode(201);
- $this->setBodyJSON(true);
- }
- }
|