File tree Expand file tree Collapse file tree 3 files changed +62
-0
lines changed Expand file tree Collapse file tree 3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 1919// Include the required vendors for the autoloading shite
2020use Spindle \System \Engine \Action ;
2121use 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 ;
2226use Spindle \System \Library \Security \Session ;
2327
2428require_once (DIR_SYSTEM . 'vendor.php ' );
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 ' ;
File renamed without changes.
Original file line number Diff line number Diff line change 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 ' ;
You can’t perform that action at this time.
0 commit comments