Requests in Elefant are all handled by the main index.php
file, which uses lib/Controller.php
to determine where to send requests for handling. Here is a diagram that illustrates the flow of a request through Elefant:

- A new request is received by
index.php
, the front controller
- The request is routed to the correct handler, e.g.,
myapp/handler
- The handler determines how to handle the request, and calls on your model(s) to return the requested data
- The handler renders the data with a view template and returns it to the front controller
- The front controller optionally renders the final output with a layout template
- The response is returned to the user
Next: Mapping your routes