Welcome Guest, Not a member yet? Register   Sign In
Codeigniter development (v3.0)
#6

[eluser]Aken[/eluser]
[quote author="wiredesignz" date="1352445903"]@Aken, I think you're a bit confused, that regex only returns the first ($1) and second ($2) matches from the beginning of the URL. Modifying this basic regex or adding additional routing before this would be needed to manage other segments.[/quote]

I am partially mistaken (not "confused"...) in that it does not affect every dash. However, it has nothing specifying the beginning of the URI. In fact, adding this in as-is, the last dash is replaced with an underscore. And that dash can be anywhere in the URI, including far down the segments. Like you said yourself, you need more complicated regex or additional routes in order to achieve the same functionality is one single str_replace().

Quote:If you are also using routing to establish application business logic then there is nothing further to discuss. We are obviously at different places in our understanding of application development and maintenance.

I obviously don't use application logic in routes with CI, because it didn't exist until now. And like the person who proposed this change in the first place, I don't really see myself using it for anything beyond some simple string manipulation, or perhaps throwing an error like show_404(). But that's my scope. Someone else may find a new, interesting use, and I'd like to see that. Because maybe I could learn something.

By all means, show us what kind of awful business logic you might expect people to use in the closures. It's difficult for me to think of these things because it's not my coding style. I'm all ears.


Messages In This Thread
Codeigniter development (v3.0) - by El Forum - 11-07-2012, 05:38 AM
Codeigniter development (v3.0) - by El Forum - 11-07-2012, 09:55 PM
Codeigniter development (v3.0) - by El Forum - 11-07-2012, 10:27 PM
Codeigniter development (v3.0) - by El Forum - 11-08-2012, 11:11 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 12:25 AM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 03:06 AM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 03:37 AM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 03:40 AM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 04:13 AM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 01:36 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 01:45 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 02:00 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 02:06 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 02:10 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 02:16 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 02:22 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 02:39 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 02:41 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 02:56 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 03:04 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 09:29 PM
Codeigniter development (v3.0) - by El Forum - 11-09-2012, 10:37 PM
Codeigniter development (v3.0) - by El Forum - 11-10-2012, 01:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB