diff options
Diffstat (limited to 'application/front/controllers/ShaarliController.php')
-rw-r--r-- | application/front/controllers/ShaarliController.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/application/front/controllers/ShaarliController.php b/application/front/controllers/ShaarliController.php new file mode 100644 index 00000000..2a166c3c --- /dev/null +++ b/application/front/controllers/ShaarliController.php | |||
@@ -0,0 +1,31 @@ | |||
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 | } | ||