implement separated models

This commit is contained in:
yggverse 2024-08-02 22:00:28 +03:00
parent 47b7344e2e
commit 10534df069
17 changed files with 662 additions and 520 deletions

View file

@ -76,7 +76,7 @@ class Content
{
$this->table->data->clear();
if ($records = $this->container->bookmark->browser->database->findBookmark($filter))
if ($records = $this->container->bookmark->browser->database->bookmark->find($filter))
{
foreach ($records as $record)
{

View file

@ -20,7 +20,7 @@ class Delete extends Button
{
if ($id = $this->navbar->container->content->table->getSelectedId())
{
$this->navbar->container->bookmark->browser->database->deleteBookmark(
$this->navbar->container->bookmark->browser->database->bookmark->delete(
$id
);
}

View file

@ -279,7 +279,7 @@ class Page
if ($pid === 0)
{
$this->container->browser->database->renewHistory(
$this->container->browser->database->history->renew(
$this->navbar->request->getValue(),
$this->title->getValue()
);

View file

@ -25,7 +25,7 @@ class Bookmark extends Button
): void
{
$this->setImage(
$this->navbar->page->container->browser->database->toggleBookmark(
$this->navbar->page->container->browser->database->bookmark->toggle(
$this->navbar->request->getValue(),
$this->navbar->page->title->getValue()
) ? self::_IMAGE_STARRED_YES : self::_IMAGE_STARRED_NON
@ -35,7 +35,7 @@ class Bookmark extends Button
public function refresh(): void
{
$this->setImage(
$this->navbar->page->container->browser->database->getBookmark(
$this->navbar->page->container->browser->database->bookmark->get(
$this->navbar->request->getValue()
) ? self::_IMAGE_STARRED_YES : self::_IMAGE_STARRED_NON
);

View file

@ -68,7 +68,7 @@ class Completion
{
$this->suggestion->clear();
foreach ($this->request->navbar->page->container->browser->database->findBookmark(
foreach ($this->request->navbar->page->container->browser->database->bookmark->find(
$this->request->getValue(),
$offset,
$limit
@ -77,7 +77,7 @@ class Completion
$suggestions[] = $history->request;
}
foreach ($this->request->navbar->page->container->browser->database->findHistory(
foreach ($this->request->navbar->page->container->browser->database->history->find(
$this->request->getValue(),
$offset,
$limit

View file

@ -42,7 +42,7 @@ class Tab
);
// Restore previous session
foreach ($this->container->browser->database->getSession() as $session)
foreach ($this->container->browser->database->session->get() as $session)
{
$this->append(
$session->request,

View file

@ -76,7 +76,7 @@ class Content
{
$this->table->data->clear();
if ($records = $this->container->history->browser->database->findHistory($filter))
if ($records = $this->container->history->browser->database->history->find($filter))
{
foreach ($records as $record)
{

View file

@ -20,7 +20,7 @@ class Delete extends Button
{
if ($id = $this->navbar->container->content->table->getSelectedId())
{
$this->navbar->container->history->browser->database->deleteHistory(
$this->navbar->container->history->browser->database->history->delete(
$id
);
}