mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Remove dbg
This commit is contained in:
@@ -747,8 +747,6 @@ class Response extends SwooleResponse
|
||||
*/
|
||||
public function output(Document $document, string $model): array
|
||||
{
|
||||
$print = $model === 'attributeEnum';
|
||||
|
||||
$data = clone $document;
|
||||
$model = $this->getModel($model);
|
||||
$output = [];
|
||||
@@ -762,14 +760,6 @@ class Response extends SwooleResponse
|
||||
}
|
||||
|
||||
foreach ($model->getRules() as $key => $rule) {
|
||||
if ($print && $key === 'elements') {
|
||||
var_dump('Output 1 ===++++ ');
|
||||
var_dump($key);
|
||||
var_dump($rule);
|
||||
var_dump($data);
|
||||
var_dump($data[$key]);
|
||||
}
|
||||
|
||||
if (!$data->isSet($key) && $rule['required']) { // do not set attribute in response if not required
|
||||
if (\array_key_exists('default', $rule)) {
|
||||
$data->setAttribute($key, $rule['default']);
|
||||
@@ -783,18 +773,11 @@ class Response extends SwooleResponse
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($print && $key === 'elements') {
|
||||
var_dump('Output 1 ===++++ ');
|
||||
var_dump($key);
|
||||
var_dump($rule);
|
||||
var_dump($data);
|
||||
var_dump($data['formatOptions'][$key]);
|
||||
}
|
||||
|
||||
if ($rule['array']) {
|
||||
if (!is_array($data[$key])) {
|
||||
throw new Exception($key . ' must be an array of type ' . $rule['type']);
|
||||
}
|
||||
|
||||
foreach ($data[$key] as $index => $item) {
|
||||
if ($item instanceof Document) {
|
||||
if (\is_array($rule['type'])) {
|
||||
|
||||
Reference in New Issue
Block a user