Sunday, January 14, 2018

Overriding MysqliManager.php

Overriding the stock SQL Managers


It took me a while to figure out how to override the core MysqliManager class so that I could add some code to email me the SQL errors that usually just go to my logs.  At first I tried just creating the custom file, expecting it to be read like others I had created, but I found that you actually  have to tell the system to use your custom class in the config_override.php file like this



After that you can just create the standard custom file in custom/include/database/CustomMysqliManager.php like this overriding as little or as much as you want.

No comments:

Post a Comment