forked from steampixel/simplePHPComponents
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
27 lines (20 loc) · 698 Bytes
/
index.php
File metadata and controls
27 lines (20 loc) · 698 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
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// Use this namespace
use Steampixel\Component;
// Include component class
include 'src/Steampixel/Component.php';
// Add a second components folder for demonstration of component and block overriding
Component::addFolder('components/custom');
// Add the folder where the components live
Component::addFolder('components/default');
// Create the layout component together with some child components
$page = Component::create('pages/index');
// Assign a few variables to the layout component
$page->assign([
'lang' => 'en',
'title' => 'Lorem Ipsum'
])
->print();