Currently we have a system that uses Doctrine ORM2, we have our Entities, and our DAOS themes, within our DAOS classes we have several methods that we use to make queries, Change, Insert and Delete Data in the database. >
We've created some prefixes for these operations:
slt = > select
lst = > list
get = > usually search for a specific ID
alt = > change
ins = > insert
del = > delete
So a name for a method in the Users> class that will insert a new user or search for a specific one on the system would be:
insUsuario or getUsuario
So far so good, the problem is that I'm creating an api and wanted to use these DAOS methods already ready to do various operations on the database, I'm using the Slim Framework to help me create api , and I wanted to use DAOS as follows:
Where:
- Where users = > UsuariosDAO
- Where getUser = > method of the UsersData class
But I researched and read that using method names in an api is not good practice, and I have classes here that have more than 50 different methods, and I do not know what to do because I wanted to use these methods already ready, how could I do this using my methods that are already done in DAOS?