The framework used in Pachno borrows concepts from modern php frameworks such as Symfony, Laravel and others. If you're used to writing modern php applications, you'll feel right at home with the MVC framework used in Pachno.
The core framework consists of several classes working together to handle everything from bootstrapping, caching, logging, routing, response handling and a lot more.
You will find the framework in the
pachno\core\framework namespace. All classes mentioned in this overview are in this namespace.
||Handles retrieving and storing items in the cache. Can be utilized by modules to cache data on demand.|
|Controller and Routing||
||Takes care of routing requests by mapping the url to their corresponding controller methods|
||Tools and utilities for debugging pachno and its modules. Includes a debugging toolbar and useful tools.|
||Dispatches events and handles passing data to and from listeners.|
||Handles translating text and formatting data according to the specified locale|
||Handles logging, including different log levels and outputting to log files.|
||Handles outputting data to the user.|
Templating in Pachno is done using regular
.php files and no specific templating language. Parameters and variables are passed to templates through the controllers, and some "global" variables such as the user object, current project, request and response are always available in the template.
Variables available to all templates
||The current request.|
||The current route information.|
||The response object.|
||The current user - either authenticated or a guest user.|
Storing and retrieving data from the database
Pachno uses the B2db framework for data persistence. This ORM framework handles transforming data objects to and from the database, as well as providing methods for querying the database.
All the database entities and their corresponding table classes are available in the