Projekt

Obecné

Profil

Stáhnout (807 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1 3416b114 Jan Šedivý
<?php
2
3
namespace App\Model;
4
5
6
use Nette\Http\Session;
7
use Nette\Http\SessionSection;
8
9
class TransliterationSearchModel
10
{
11
    const SECTION_NAME = 'TransliterationSearch';
12
    const SECTION_EXPIRATION = 0;
13
14
    /** @var SessionSection */
15
    private $section;
16
17
    public function __construct(Session $session)
18
    {
19
        $this->section = $session->getSection(self::SECTION_NAME);
20
        $this->section->setExpiration(self::SECTION_EXPIRATION);
21
    }
22
23
    /**
24
     * @return SessionSection
25
     */
26
    public function getTransliterationSearchSection()
27
    {
28
        return $this->section;
29
    }
30
31
    public function setSearchTerms($searchTerms)
32
    {
33
        $this->section->searchTerms = $searchTerms;
34
    }
35
36
    public function getSearchTerms()
37
    {
38
        return $this->section->searchTerms;
39
    }
40
}