Introduction
Here we will learn what is & how Simcify works.
There are many design patterns when it comes to writing PHP applications. With Simcify, we chose the MVC pattern coupled with a singleton service container.
The following is the application tree structure that is relevant to PHP:
/config - this folder contains the application's configuration files by category.
/lang - This folder stores all human language folders in standardized format. For example, the en_US folder here would contain language files specific to the English language denoted by its two digit code en and the region USA denoted by its two digit country code US.
/src - Within this folder are:-
the main Simcify classes (like the /src/Application.php file),
/Controllers - this folder contains route controller classes
/Controller.php - this is the parent controller class which should be extended by all controllers.
/Exceptions - this is where all custom exceptions that Simcify uses
/Handler.php - this file handles all exeptions thrown by Simcify after routing has been started.
/helpers.php - helper function declarations that are available throughout the entire application.
/Middleware - this contains routing middleware classes
/routes.php - these are route declarations for the application
/views - contains the application views/layouts in HTML or plain text format
/compiled - contains all compiled views and is only used internally by Simcify
/emails - contains views specific to emails sent out by the application
/html - holds the html body versions of an email
/text - holds the plain text versions of an email
/errors - contains views that the application uses when an error has been encountered. They are named by their respective HTTP status codes. A slight note here, if a request is detected as an AJAX request, you are expected to give your own responses when errors occur. These views are only rendered on normal HTTP requests.
Any other folders in here are custom and can be added if your application design requires so. You are free to add more.
Last updated