News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

phpaddiction:
Url Routing with PHP - Part Three
April 16, 2007 @ 07:03:00

phpaddiction has posted part three of its URL Rewriting tutorial series today - the creation of the "C" (Controller) in MVC.

In the final part of this series, I will build a functional modular front controller that can be easily adapted to small projects. It is basically the "C" in MVC for a simple MVC framework. If you haven't read the first two articles I recommend that you read over them first. Url Routing with PHP - Part One and Url Routing with PHP - Part Two.

They start with the base created before (with some slight modifications) and build up the dispatcher to handle their new requests and the controller to respond. In their example, when the Controller is called, it runs the execute() method and, based on the input, either calls another function or returns an error if it doesn't exist.

1 comment voice your opinion now!
url routing mvc modelviewcontroller controller dispatch execute url routing mvc modelviewcontroller controller dispatch execute


blog comments powered by Disqus

Similar Posts

Stuart Herbert's Blog: Can You Secure A Shared Server With PHP + FastCGI?

Developer.com: Build your own MVC Framework: Making Headway

Alexander Netkachev's Blog: A little bit more about Zend_Controller plugins

Padraic Brady's Blog: An Example Zend Framework Blog App - Part 3: A Simple Hello World Tutorial

DevShed: Validating URL Protocols, Hosts and Paths with Filters in PHP 5


Community Events

Don't see your event here?
Let us know!


podcast framework example release version voicesoftheelephpant unittest laravel community security php7 video opinion language series library api laravel5 introduction interview

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework