Configuration or db connect could be implemented with singleton pattern, for example
$cfg = CONFIG::getInstance();
$cfg->setValue(2);
also making a __destruct that write config back in db, and so .. there a lot of clever idiomas that can be implemented with oop