Skip to content

Commit dec8955

Browse files
committed
Add Test support
1 parent c084a01 commit dec8955

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

framework/RestService.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ abstract class RestService extends Controller
3030

3131
//private $restDatas = array();
3232

33-
public function __construct()
33+
public function __construct($view = null, $model = null)
3434
{
35-
parent::__construct();
35+
parent::__construct($view, $model);
3636
/* $this->HTTPRequestMethod = getenv('REQUEST_METHOD'); */
3737
$this->HTTPRequestMethod = $_SERVER['REQUEST_METHOD'];
3838
$this->HTTPRequestHeaders = getallheaders();
@@ -265,4 +265,14 @@ protected function restrictToRBAC($redirect = null, $returnLink = null, $LoginWa
265265
}
266266
return $user;
267267
}
268+
269+
public function getAllowedMethods(): array
270+
{
271+
return $this->allowedMethods;
272+
}
273+
274+
public function getAccessControlAllowOrigins(): array
275+
{
276+
return $this->accessControlAllowOrigins;
277+
}
268278
}

0 commit comments

Comments
 (0)