Welcome Guest, Not a member yet? Register   Sign In
Getting the requested "format" from a route
#1

[eluser]ejangi[/eluser]
Hey guys,

I'm wanting to get the "format" from the route. By that I mean that from uri's like:
Code:
http://www.mydomain.com/controller/model/index.html
http://www.mydomain.com/controller/model/index.xml

I want to know whether the user is requesting HTML or XML.

Looking through the Router.php class I noticed that the "/" [read: slash] is hard-coded as the segment separator, so it looks like I will have to overwrite at least the _set_route_mapping() or _get_uri_string() methods in my own library.

I just thought that before I dive in head-first, I'd ask to see if anyone's already done this?


Messages In This Thread
Getting the requested "format" from a route - by El Forum - 12-12-2007, 04:44 PM
Getting the requested "format" from a route - by El Forum - 12-13-2007, 12:20 AM
Getting the requested "format" from a route - by El Forum - 12-13-2007, 01:36 AM
Getting the requested "format" from a route - by El Forum - 12-13-2007, 02:01 AM
Getting the requested "format" from a route - by El Forum - 12-14-2007, 12:09 AM
Getting the requested "format" from a route - by El Forum - 12-14-2007, 03:01 AM
Getting the requested "format" from a route - by El Forum - 12-14-2007, 09:09 AM
Getting the requested "format" from a route - by El Forum - 12-14-2007, 06:04 PM
Getting the requested "format" from a route - by El Forum - 12-14-2007, 06:06 PM
Getting the requested "format" from a route - by El Forum - 12-14-2007, 09:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB