]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | ||
3 | declare(strict_types=1); | |
4 | ||
5 | namespace Shaarli\Front\Controller; | |
6 | ||
7 | use Shaarli\Container\ShaarliContainer; | |
8 | ||
9 | abstract class ShaarliController | |
10 | { | |
11 | /** @var ShaarliContainer */ | |
12 | protected $ci; | |
13 | ||
14 | /** @param ShaarliContainer $ci Slim container (extended for attribute completion). */ | |
15 | public function __construct(ShaarliContainer $ci) | |
16 | { | |
17 | $this->ci = $ci; | |
18 | } | |
19 | ||
20 | /** | |
21 | * Assign variables to RainTPL template through the PageBuilder. | |
22 | * | |
23 | * @param mixed $value Value to assign to the template | |
24 | */ | |
25 | protected function assignView(string $name, $value): self | |
26 | { | |
27 | $this->ci->pageBuilder->assign($name, $value); | |
28 | ||
29 | return $this; | |
30 | } | |
31 | } |