forked from Magicianred/php-simple-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabout.php
More file actions
27 lines (20 loc) · 709 Bytes
/
about.php
File metadata and controls
27 lines (20 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
require_once __DIR__ . '/autoload.php';
use SimpleApp\Configs;
use SimpleApp\Utils;
$baseConfig = new Configs\Base;
$viewEngine = new Utils\ViewEngine(__DIR__);
$jsonLoader = new Utils\JsonLoader(__DIR__);
$markdownLoader = new Utils\MarkdownLoader(__DIR__);
$mdText = $markdownLoader->load_page('about');
/* For demonstration purpose */
$mdHtml = $markdownLoader->convert_markdown_html($mdText);
/* END For demonstration purpose */
$variables = [
'currentPage' => 'about',
'mdText' => $mdText,
/* For demonstration purpose */
'mdHtml' => $mdHtml,
];
$variables = array_merge($baseConfig->getBaseInfo(), $variables);
echo $viewEngine->getEngine()->run('pages.about', $variables);