diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-01-18 17:50:11 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-01-26 11:34:14 +0100 |
commit | 6c50a6ccceecf54850e62c312ab2397b84d89ab4 (patch) | |
tree | 3205aa447930eab020ea04bf00082880abec5001 /application/front/controllers/ShaarliController.php | |
parent | 1410dce2db310e71b5e683b0871c2f28d8807844 (diff) | |
download | Shaarli-6c50a6ccceecf54850e62c312ab2397b84d89ab4.tar.gz Shaarli-6c50a6ccceecf54850e62c312ab2397b84d89ab4.tar.zst Shaarli-6c50a6ccceecf54850e62c312ab2397b84d89ab4.zip |
Render login page through Slim controller
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 | } | ||