I also extend DataMapper, and there's no need to do what you're proposing. When CI loads the library ($this->load->library('datamapper') or in your autoload config), the DataMapper class is instantiated and that code runs as it should. If you make your change, then you will run code for every DMZ model instantiation that only needs to run once when the library itself is loaded.