Skip to content

Commit 1556915

Browse files
"Added more dependencies because the ones we already have weren't enough to choke this framework"
1 parent 651b27a commit 1556915

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

public_html/system/framework/app.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
// Include the required vendors for the autoloading shite
2020
use Spindle\System\Engine\Action;
2121
use Spindle\System\Library\Security\Csp;
22+
use Spindle\System\Library\Http\Document;
23+
use Spindle\System\Library\Security\Csrf;
24+
use Spindle\System\Library\Template\Template;
25+
use Spindle\System\Library\Language\Language;
2226
use Spindle\System\Library\Security\Session;
2327

2428
require_once(DIR_SYSTEM . 'vendor.php');
@@ -77,3 +81,23 @@
7781
// Start the session
7882
$session->start();
7983

84+
// Template
85+
$template = new Template($session);
86+
$template->addPath(DIR_TEMPLATE); // Default path
87+
$template->addPath('shared', MAIN_WEB_ROOT . 'shared/view/');
88+
$registry->set('template', $template);
89+
90+
// Language
91+
$language = new Language($config->get('language_code'));
92+
$language->addPath(DIR_LANGUAGE);
93+
$language->load('default');
94+
$registry->set('language', $language);
95+
96+
// Document
97+
$registry->set('document', new Document($csp));
98+
99+
// CSRF
100+
$registry->set('csrf', new Csrf($session));
101+
102+
// Finalise
103+
require DIR_SYSTEM . 'engine/finalise.php';
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
/*
3+
* Spindle CMS
4+
* Copyright (c) 2025. All rights reserved.
5+
*
6+
* This file is part of the Spindle CMS project — a lightweight, modular PHP content framework derived from OpenCart.
7+
*
8+
* @license GNU General Public License v3.0 (GPL-3.0-or-later)
9+
* @link https://github.com/RandomCoderTinker/Spindle
10+
*/
11+
12+
// default Values
13+
$_['site_url'] = 'https://www.spindle.website/';
14+
$_['application'] = 'app';
15+
16+
// Response
17+
$_['response_header'] = ['Content-Type: text/html; charset=utf-8'];
18+
$_['response_compression'] = 0;
19+
20+
$_['action_pre_action'] = [];
21+
22+
$_['action_event'] = [
23+
'controller/*/before' => [
24+
0 => 'event/language.before',
25+
],
26+
'controller/*/after' => [
27+
0 => 'event/language.after',
28+
],
29+
'view/*/before' => [
30+
998 => 'event/language',
31+
],
32+
'language/*/after' => [
33+
0 => 'system/language.after',
34+
],
35+
];
36+
37+
$_['action_default'] = 'common/home';
38+
$_['action_error'] = 'error/not_found';

0 commit comments

Comments
 (0)