Welcome Guest, Not a member yet? Register   Sign In
Passing a single array to a model
#5

[eluser]TheFuzzy0ne[/eluser]
[quote author="n0xie" date="1236709129"]But it depends on how many different delimiter cases you really need. Else I would just make several functions to improve readability:

Code:
function fooById()
function fooByName()
function fooByBar()

I'm not sure that is considered 'best practice'...[/quote]

That's precisely my point. I'm not sure whether or not I should be repeating code like that. Or perhaps I should have a single private function, that deals with everything, and use those functions as aliases, which set the appropriate array data, pass it to the private function, and pass back the return data.

Thanks for your comments. Smile


Messages In This Thread
Passing a single array to a model - by El Forum - 03-08-2009, 12:40 PM
Passing a single array to a model - by El Forum - 03-10-2009, 06:59 AM
Passing a single array to a model - by El Forum - 03-10-2009, 07:18 AM
Passing a single array to a model - by El Forum - 03-10-2009, 07:30 AM
Passing a single array to a model - by El Forum - 03-10-2009, 07:35 AM
Passing a single array to a model - by El Forum - 03-10-2009, 07:37 AM
Passing a single array to a model - by El Forum - 03-10-2009, 07:43 AM
Passing a single array to a model - by El Forum - 03-10-2009, 07:48 AM
Passing a single array to a model - by El Forum - 03-10-2009, 08:36 AM
Passing a single array to a model - by El Forum - 03-10-2009, 08:50 AM
Passing a single array to a model - by El Forum - 03-10-2009, 08:55 AM
Passing a single array to a model - by El Forum - 03-10-2009, 09:13 AM
Passing a single array to a model - by El Forum - 03-10-2009, 09:47 AM
Passing a single array to a model - by El Forum - 03-10-2009, 09:53 AM
Passing a single array to a model - by El Forum - 03-10-2009, 10:35 AM
Passing a single array to a model - by El Forum - 03-10-2009, 10:53 AM
Passing a single array to a model - by El Forum - 03-10-2009, 11:23 AM
Passing a single array to a model - by El Forum - 03-10-2009, 11:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB