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

[eluser]Filippo Toso[/eluser]
[quote author="bapobap" date="1277045915"]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.[/quote]

What about a "pre_system" hook?

You can change the REQUEST_URI in the hook depending on the request method. As the pre_system hook is fired before the URI class creation, it should work almost transparently.

Using a custom configuration file and some routing logic you should be able to get a fairly flexible solution.


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