Upgrade to 3.9.0

This commit is contained in:
Bastian Allgeier
2023-01-17 14:50:16 +01:00
parent 0ebe0c7b16
commit 6e5c9d1f48
132 changed files with 1664 additions and 1254 deletions

View File

@@ -23,7 +23,7 @@ class Collection
protected Api $api;
protected $data;
protected $model;
protected $select;
protected $select = null;
protected $view;
/**
@@ -36,7 +36,6 @@ class Collection
$this->api = $api;
$this->data = $data;
$this->model = $schema['model'] ?? null;
$this->select = null;
$this->view = $schema['view'] ?? null;
if ($data === null) {

View File

@@ -91,12 +91,8 @@ class Model
*/
public function selection(): array
{
$select = $this->select;
if ($select === null) {
$select = array_keys($this->fields);
}
$select = $this->select;
$select ??= array_keys($this->fields);
$selection = [];
foreach ($select as $key => $value) {