super) { return true; } return $node !== null && in_array($node, $this->nodes, true); } public function getUser(?string $field = null, $default = null) { if ($field === null) { return $this->user; } return $this->user[$field] ?? $default; } public function getUserId(): int { return $this->userId; } public function isSuper(): bool { return $this->super; } public function isLogin(): bool { return $this->login; } public function withUploadUnid(?string $uptoken = null): array { return [0, []]; } public function clearAuth(): bool { return true; } public function getData(string $name, $default = []) { return $this->data[$name] ?? $default; } public function setData(string $name, $value): bool { $this->data[$name] = $value; return true; } public function setOplog(string $action, string $content): bool { return true; } public function baseItems(string $type, array &$data = [], string $field = 'base_code', string $bind = 'base_info'): array { return []; } public function setUser(array $user = [], bool $login = false, bool $super = false): self { $this->user = $user; $this->userId = intval($user['id'] ?? 0); $this->login = $login; $this->super = $super; return $this; } public function setNodes(array $nodes = []): self { $this->nodes = array_values(array_unique(array_filter(array_map('strval', $nodes)))); return $this; } }