some changes for search
This commit is contained in:
39
lib/Tools/tableData.php
Normal file
39
lib/Tools/tableData.php
Normal 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];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user