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

Master Zend Framework:
HowTo Use Child and Segment Routes to Build Simple Routing Tables
Apr 03, 2014 @ 16:15:05

Matthew Setter has a new post to his Master Zend Framework site today showing you how to use child and segment routes to create a routing table in your Zend Framework v2 application. These routes are "sub-routes" underneath a main route defined in the main router configuration.

Routing is one of the key requirements in modern applications, especially in Zend Framework 2; but they shouldn’t be overly-complicated. Today, we’re going to look at how to build a routing table, simply and easily using child and segment routes. [...] But how would we do that? Gladly, it’s quite simply, using a combination of [the] two route types: Segment and Child Routes. I’ve made a complete example, which’s available in this Gist. Feel free to skip straight to that. But otherwise, let’s step through the annotated version together.

He sets the stage with an example in a "writing pipeline" application that helps him predict his income from his freelance writing. He describes the main controllers and the routing configurations they might share. In his example code, he shows how to define the routes and modify them to use segments and child routes to handle constraints. There's also a section about extracting out the segments from the route.

tagged: child segment routes tutorial routing zendframework2

Link: http://www.masterzendframework.com/tutorial/child-and-segment-routes

Matt Curry's Blog:
Yahoo Search BOSS as a CakePHP Plugin
Feb 11, 2009 @ 17:14:00

In Matt Curry's most recent blog entry he looks at the creation of a CakePHP plugin that integrates Yahoo! Search BOSS (Build your Own Search Service) into an application.

I mention that Neil’s code would make a really cool plugin. This sparked a discussion as to whether this was possible with Cake’s current plugin architecture. The issues where: how to get the datasource configuration, which would normally go in /app/config/database.php, how to reference the datasource class itself and how to handle the custom route.

The created the plugin with a ConnectionManager instance that goes out and loads in a configuration file inside of his search model in his application.

tagged: cakephp boss yahoo plugin search engine model routes

Link:

Mike Naberezny's Blog:
New in Horde: Routes
Sep 19, 2007 @ 16:11:00

On his blog today, Mike Naberezny has posted about something new that's just been released - Horde_Routes:

I'm pleased to announce the first release of Horde_Routes, a new URL mapping system for PHP 5. This package provides classes for mapping URLs into the controllers and actions of an MVC system, inspired by Ruby on Rails.

They came up with the system because they "wanted RESTful routing, named routes, sophisticated matching, PHP 5 E_STRICT, and extensive test coverage" and nothing else seemed to meet them all. Horde_Routes includes features like route recognition and generation, named routes, being PHP 5 E_STRICT compliant and has a comprehensive unit test suite. Right now, the Routes system is in a beta stage but should be quickly moving to stable.

tagged: horde routes release mapping url system horde routes release mapping url system

Link:

Mike Naberezny's Blog:
New in Horde: Routes
Sep 19, 2007 @ 16:11:00

On his blog today, Mike Naberezny has posted about something new that's just been released - Horde_Routes:

I'm pleased to announce the first release of Horde_Routes, a new URL mapping system for PHP 5. This package provides classes for mapping URLs into the controllers and actions of an MVC system, inspired by Ruby on Rails.

They came up with the system because they "wanted RESTful routing, named routes, sophisticated matching, PHP 5 E_STRICT, and extensive test coverage" and nothing else seemed to meet them all. Horde_Routes includes features like route recognition and generation, named routes, being PHP 5 E_STRICT compliant and has a comprehensive unit test suite. Right now, the Routes system is in a beta stage but should be quickly moving to stable.

tagged: horde routes release mapping url system horde routes release mapping url system

Link:


Trending Topics: