[5.0] Loading the core framework |
I want you to consider the change in loading the core framework.
This change will optimize the code and give flexibility to developers who want to customize their handlers. First of all I would suggest to move bootstrap.php to root and change as follows. (This will allow developers to make changes) PHP Code: # ROOT/bootstap.php And this is how the entry points for the console and HTTP requests might look like. PHP Code: # ROOT/spark.php Looking at the core now, the Response::send() method can be called in different places than the code. In the example above, the CodeIgniter::run() method for the HTTP request handler will expect an object of the Response class. And the core itself will call the Response::send() method in one place. A simple example of what I mean. PHP Code: class Exceptions That is, both with a normal response and with exception handling. In both cases, CodeIgniter::sendResponse() will be called. This will give a single point of response that allowed you to hang events or any other logic. Also, separating the request handler into a separate one will simplify testing (no need to read the buffer and extract the protected property), PHP Code: ob_start();
I agree to rework the flow.
Here is the 4.3 flow for my understanding: http://blog.a-way-out.net/img/2022/10/31...s-flow.svg (11-11-2022, 12:20 AM)kenjis Wrote: I agree to rework the flow. Isn't this the current architecture? What is the difference?
The mind map is for the current 4.3.
It is intended to help devs understand the current implementation. |
Welcome Guest, Not a member yet? Register Sign In |