![]() |
Make custom driver - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Make custom driver (/showthread.php?tid=68964) |
Make custom driver - omid_student - 09-20-2017 Hello guys I try to make driver with below sample code https://stackoverflow.com/questions/23530989/create-custom-driver-using-codeigniter but it get error "Invalid driver requested: Testdriver_first_driver" Why? RE: Make custom driver - rtenny - 09-20-2017 I think the code in SO is for CI 2. That might nor work in CI3 without modifications. Ralf RE: Make custom driver - omid_student - 09-21-2017 (09-20-2017, 08:01 AM)rtenny Wrote: I think the code in SO is for CI 2. Do you have solution? RE: Make custom driver - rtenny - 09-21-2017 Very sorry, dont even know what a driver would be for. I cannot help you with this at all. RE: Make custom driver - omid_student - 09-24-2017 (09-21-2017, 04:23 AM)rtenny Wrote: Very sorry, dont even know what a driver would be for.Is there exist looklike driver? RE: Make custom driver - XMadMax - 09-26-2017 (09-24-2017, 02:00 AM)omid_student Wrote:(09-21-2017, 04:23 AM)rtenny Wrote: Very sorry, dont even know what a driver would be for.Is there exist looklike driver? Take a look to a file named /system/libraries/Session/Session_driver.php , it is a form to make drivers in CI 3. RE: Make custom driver - omid_student - 09-27-2017 (09-26-2017, 05:00 AM)XMadMax Wrote:(09-24-2017, 02:00 AM)omid_student Wrote:(09-21-2017, 04:23 AM)rtenny Wrote: Very sorry, dont even know what a driver would be for.Is there exist looklike driver? Thanks Do you suggest other way instead of driver? I want to make driver or library for send message via SMS,Push,Email RE: Make custom driver - ciadvantage - 09-27-2017 You can either make a helper function and put it under helper dir or make a useful class and put it under libraries. It is entirely up to you and depends on how you implement it. I will make a email class and maybe sms as extends of email then a push class whatever. The advantage to place them under libraries or helpers dir is you can call them to any controllers / models. Regards RE: Make custom driver - ciadvantage - 09-27-2017 Here is an example of how I make a custom lib email, it is for your reference on how I do it Code: /** |