mirror of
http://124.126.16.154:8888/singularity/HyperfDevelopmentKitCore.git
synced 2026-01-15 07:35:08 +08:00
fix(controller): 修复方法访问级别不足以继承的问题
Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
This commit is contained in:
@@ -20,11 +20,11 @@ use Singularity\HDK\Core\Service\ExtendService;
|
||||
trait RestfulList
|
||||
{
|
||||
#[Inject]
|
||||
private ExtendService $extend;
|
||||
protected ExtendService $extend;
|
||||
#[Inject]
|
||||
private RequestInterface $request;
|
||||
protected RequestInterface $request;
|
||||
|
||||
public function restSelect(Closure $callback, ?Closure $filter = null)
|
||||
protected function restSelect(Closure $callback, ?Closure $filter = null)
|
||||
{
|
||||
$options = [];
|
||||
$result = $this->parseParameters(function ($query, $parsedOptions) use ($callback, &$options) {
|
||||
@@ -34,7 +34,7 @@ trait RestfulList
|
||||
return $this->responseFormatter($options, $result, $filter);
|
||||
}
|
||||
|
||||
public function parseParameters(Closure $callback): mixed
|
||||
protected function parseParameters(Closure $callback): mixed
|
||||
{
|
||||
$query = $this->request->getQueryParams();
|
||||
$options = [
|
||||
@@ -49,7 +49,7 @@ trait RestfulList
|
||||
return $callback(query: $query, options: $options);
|
||||
}
|
||||
|
||||
public function responseFormatter(
|
||||
protected function responseFormatter(
|
||||
array $options,
|
||||
Builder $builder,
|
||||
?Closure $filter = null
|
||||
|
||||
Reference in New Issue
Block a user