All of the pages and resources that php will give through readfile() exist in a database table entities. The entities table includes the uri alias for the object, what type of object it is so it can properly route it. Should I just include it in application/config/routes.php, should I write some helper functions and include them in the application/config/routes.php?
Should I put this elsewhere?
example:
URI:
index.php/about-us
SQL:
SELECT *
FROM entities
WHERE alias LIKE ?
RESULT:
array(
[id]=>5
[alias]=>'about-us'
[type]=>'page'
ROUTE:
"page/get_page/$1"