Skip to Main Content
Pro PHP MVC
book

Pro PHP MVC

by Chris Pitt
October 2012
Beginner to intermediate content levelBeginner to intermediate
500 pages
10h 29m
English
Apress
Content preview from Pro PHP MVC

CHAPTER 7

images

Routing

Routing is what happens when an application determines which controllers and actions are executed based on the URL requested. Simply put, it is how the framework gets from http://localhost/users/list.html to the Users controller and the list() action.

Goals

  • We need to understand what routes are and how they work.
  • We need to build the different kinds of routes.
  • We need to build the Router class that will manage these routes.

Defining Routes

Some routes can be inferred from the structure of the application. If the Router class sees that you have an Articles controller with a search() method, if can sometimes assume that the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro PHP Programming

Pro PHP Programming

Peter MacIntyre, Brian Danchilla, Mladen Gogala
Ajax Design Patterns

Ajax Design Patterns

Michael Mahemoff

Publisher Resources

ISBN: 9781430241645Purchase book