Welcome Guest, Not a member yet? Register   Sign In
passing data to a custom library
#7

[eluser]Aken[/eluser]
Unfortunately, CI developers have limited the parameter field of the library loader to only arrays out of the box. However, you can extend the Loader core class and replace the Library function with a slight modification to accept any variable. Be careful in doing so, though, as some libraries may not have any sort of handling/sanitization of their parameter field, and expect to only accept arrays. You want to make sure to always pass the exact type of parameter expected when loading a library.

Otherwise, you can just modify your library constructors to handle arrays, like fesweb showed (that's the way I prefer to do it).


Messages In This Thread
passing data to a custom library - by El Forum - 09-21-2010, 06:30 PM
passing data to a custom library - by El Forum - 09-21-2010, 07:52 PM
passing data to a custom library - by El Forum - 09-21-2010, 08:25 PM
passing data to a custom library - by El Forum - 09-22-2010, 08:19 AM
passing data to a custom library - by El Forum - 10-08-2010, 07:20 PM
passing data to a custom library - by El Forum - 08-05-2011, 03:06 PM
passing data to a custom library - by El Forum - 08-05-2011, 05:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB