simplified the process of adding more search sites

This commit is contained in:
huangjx
2022-02-28 23:15:37 +08:00
parent dfb0d3fd9f
commit 618417023b
15 changed files with 173 additions and 41 deletions

View File

@@ -9,6 +9,7 @@ abstract class searchBase
protected $rows = [];
protected $errors = [];
protected $actionLinks = [["name" => 'download', 'path' => '/index.php/apps/ncdownloader/new'], ['name' => 'clipboard']];
private static $instance = null;
public function getTableTitles(): array
{
@@ -18,6 +19,16 @@ abstract class searchBase
return $this->tableTitles;
}
public static function create($crawler,$client)
{
if (!self::$instance) {
self::$instance = new static($crawler,$client);
}
return self::$instance;
}
public function setTableTitles(array $titles)
{
$this->tableTitles = $titles;