Our great sponsors
-
phroute
A super fast PHP router, with route parameters, restful controllers, filters and reverse routing.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
The router code for this could look like (using Phroute for the example). The functions could be sent to classes if you have that setup.
b) Separate out all SQL and PHP database code. Put these in separate classes similar to this example Slim First Application Mapper class. You can decide later if you want to use a framework's DB code or not - it would be simply refactoring your existing code and not changing (hopefully) the API that you started using internally