I need to handle different types of DB depending on the client.
I created a Facade called MyDBFacade where I can call my own functions.
For example:
MyDBFacade::createDBUser("MyUser"); // will create a DB user whatever I'm using Postgres or SQL Server
Is there a possibility to extends the framework Facade DB:: in a way I could add my own functions and then call DB::createUser("MyUser")
?
Any clue or idea would be appreciate.
Thanks in advance, have a nice day.
Facade
"extension" class you are creating, it would appear that you cannot call the originalFacade
by name. Instead, you must use the current classname, or because of this, perhaps more semantically clear would be usingself::
. – Nostology