some changes for search

This commit is contained in:
huangjx
2022-04-26 18:13:18 +08:00
parent c42be35566
commit 3ac43ec88a
8 changed files with 70 additions and 26 deletions

39
lib/Tools/tableData.php Normal file
View File

@@ -0,0 +1,39 @@
<?php
namespace OCA\NCDownloader\Tools;
class tableData
{
protected $row, $title = [];
private $error = null;
public function __construct(array $titles = [], $rows = [])
{
$this->title = $titles;
$this->row = $rows;
}
public static function create(array $titles = [], $rows = [])
{
return new static($titles, $rows);
}
public function setError(string $error)
{
$this->error = $error;
return $this;
}
public function getError(): string
{
return $this->error;
}
public function hasError(): bool
{
return isset($this->error);
}
public function getData(): array
{
return ["title" => $this->title, "row" => $this->row];
}
}