Welcome Guest, Not a member yet? Register   Sign In
Calling method of other class
#10

[eluser]bapobap[/eluser]
Sorry just remembered why I had done it that way now!

I need to call certain methods based on the request method. So let's imagine a class called Cupcake where you can bake or eat a cupcake.

REST means that to eat a cupcake I would GET, to bake one I would POST. Routes don't allow me to send things based on the request method whereas mine does. Mine would call Cupcake::cupcake_get() or Cupcake::cupcake_post(). I don't know how that can be achieved with routes.


Messages In This Thread
Calling method of other class - by El Forum - 06-19-2010, 06:14 PM
Calling method of other class - by El Forum - 06-20-2010, 12:57 AM
Calling method of other class - by El Forum - 06-20-2010, 03:07 AM
Calling method of other class - by El Forum - 06-20-2010, 03:15 AM
Calling method of other class - by El Forum - 06-20-2010, 03:19 AM
Calling method of other class - by El Forum - 06-20-2010, 03:24 AM
Calling method of other class - by El Forum - 06-20-2010, 03:38 AM
Calling method of other class - by El Forum - 06-20-2010, 03:49 AM
Calling method of other class - by El Forum - 06-20-2010, 03:56 AM
Calling method of other class - by El Forum - 06-20-2010, 03:58 AM
Calling method of other class - by El Forum - 06-20-2010, 04:32 AM
Calling method of other class - by El Forum - 06-20-2010, 04:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB