-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstructure.txt
34 lines (29 loc) · 2.21 KB
/
structure.txt
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
28
29
30
31
32
33
34
If you want to understand an underlying technology, it's best to know the way that the technology is created, so you feel more
confident and understood when it comes to creating beautiful code.
When the user connects to the server, our main .htaccess file handles the input, and sends the request to the
`index.php` file each time for management.
This file's essentially the only thing the server ever requests, but once the server has that page requested, the rest of the
requires are loaded with it.
When the browser connects to the server, the Initialization file
is loacated at "sys/Init.php," which handles all the top-level initialization.
The order of the Init file is as goes:
>1. Load all of the "First Load" functions / classes from "/sys/load_first/*.php"
>2. Loading the config builder.
>> Config builder requires in configs and manages the new-found config variables in an ordered fashion.
>3. Loading all of the main classes into the system from "/sys/main/*.php," these classes are classes such as the Kontroller,
Entries, Joints, User Classes, App class- Just classes.
>4. Setup the App environment.
>> The "App" environment is creating the instnace for the "App" class, which manages the OPTStream/IPTStream and Errors for
the Framework.
>> The $app->Init(CALLBACK) is called which returns a true/false variable if INIT was done correctly, if you want to alter
possible faults in the INIT of the App Init file, just edit them in the __constructor found at "sys/main/App.php"
>5. Load the Libs Init file.
>> The Libs Init file is just a file that requires in classes you've added, essentially the Library manager.
>6. Finally! User interaction! Loading the Routing.php file located at "sys/build/Routing.php."
>> The routing file manages the incoming requests from the URI (trailing slash) making it easier to manage connections,
say the user requests "/profile/jek" - The Routing would be like so:
>>> $router->Get('profile', function($kontroller){
$kontroller->Load('SomeKontroller');
});
That'll load the SomeKontroller when the user requests /profile
>7. Finished Init! Rest of the code-base is ran inside of the Kontroller Routes.