use the DI to get the $db object and store in the class