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

Alexander Netkachev's Blog:
How to use Zend Framework Controller/Action approach?
Feb 08, 2007 @ 15:57:00

Continuing on from an earlier discussion about the Zend Framework and form submission and handling, Alexander Netkachev has come back to talk a bit more about the Controller/Action approach.

I have a few discussions here about the question I opened a couple of days ago: how the standard form processing is related to the Controller/Action idea and how developers that are creating sites with the standard Folder/Page approach can use Zend Framework's Controller/Action approach.

What came out of the discussions were three points - use the Controller/Action model to your advantage, use your own forms but use RewriteRouter to make them work, or use the Folder/Page mentality instead.

tagged: zendframework controller action folder page rewriterouter zendframework controller action folder page rewriterouter

Link:

Alexander Netkachev's Blog:
How to use Zend Framework Controller/Action approach?
Feb 08, 2007 @ 15:57:00

Continuing on from an earlier discussion about the Zend Framework and form submission and handling, Alexander Netkachev has come back to talk a bit more about the Controller/Action approach.

I have a few discussions here about the question I opened a couple of days ago: how the standard form processing is related to the Controller/Action idea and how developers that are creating sites with the standard Folder/Page approach can use Zend Framework's Controller/Action approach.

What came out of the discussions were three points - use the Controller/Action model to your advantage, use your own forms but use RewriteRouter to make them work, or use the Folder/Page mentality instead.

tagged: zendframework controller action folder page rewriterouter zendframework controller action folder page rewriterouter

Link:

Ligaya Turmelle's Blog:
Quick snip (or Zend Framework in a Subdirectory)
Dec 06, 2006 @ 15:44:00

As Ligaya Turmelle discovered when trying to work with the Zend Framework in a subdirectory, it doesn't want to play nice. After poking around a bit, though, she discovered a solution in the Zend_Controller_RewriteRoute package.

I am using a subfolder of web root to play with the ZF and was having troubles getting my controller to go to the correct place. After considering hacking both the Apache doc root and the actual Zend_Controller_Router code and writing a patch, I stumbled on the answer - Zend_Controller_RewriteRouter.

She includes the quick code that acts as a patch for the framework, letting it know that the directory it should be rewriting to isn't the root of the domain.

tagged: zend framework subdirectory rewriterouter rewritebase router zend framework subdirectory rewriterouter rewritebase router

Link:

Ligaya Turmelle's Blog:
Quick snip (or Zend Framework in a Subdirectory)
Dec 06, 2006 @ 15:44:00

As Ligaya Turmelle discovered when trying to work with the Zend Framework in a subdirectory, it doesn't want to play nice. After poking around a bit, though, she discovered a solution in the Zend_Controller_RewriteRoute package.

I am using a subfolder of web root to play with the ZF and was having troubles getting my controller to go to the correct place. After considering hacking both the Apache doc root and the actual Zend_Controller_Router code and writing a patch, I stumbled on the answer - Zend_Controller_RewriteRouter.

She includes the quick code that acts as a patch for the framework, letting it know that the directory it should be rewriting to isn't the root of the domain.

tagged: zend framework subdirectory rewriterouter rewritebase router zend framework subdirectory rewriterouter rewritebase router

Link:

Alexander Netkachev's Blog:
Using Zend_Controller in subfolder
Sep 27, 2006 @ 12:33:00

One of the most asked questions when it comes to using the Zend Framework is "how can I use it in a subfolder?" Everything behaves well when it's at the document root of the server it's on, but strange things start happening when it's anywhere below that. There's been server people that have posted solutions, and another can be added to them - this new post from Alexander Netkachev.

This question I had heard many times and now I have a few minutes to write down the answer so that everybody who stuck in the similar trouble could quickly resolve the issue. Who works with Zend Framework, most likely, have read the "Zend_Controller / Getting Started" Zend Framework manual article, which explains how to use Zend_Controller in the root folder of the web server. But it does not answer on the "How to run my Zend Framework application in a subfolder of the web server document folder?" question and I propose you my solutions.

First is rather a hack then a recommended solution, but with it you can start the applications and examples that use standard router. The second is neater but it depends on the Zend_Controller_RewriteRouter class.

The first method makes some changes to the default routing code itself (the hack) to make it no longer just use the REQUEST_URI, but to look at more of the URL to see if subdirectories exist. OF course, the more preferred way to go, and just as simple of an option, is using the framework itself to change the RewriteRouter options to allow for the subdirectory.

tagged: zend framework zend_controller rewriterouter router zend framework zend_controller rewriterouter router

Link:

Alexander Netkachev's Blog:
Using Zend_Controller in subfolder
Sep 27, 2006 @ 12:33:00

One of the most asked questions when it comes to using the Zend Framework is "how can I use it in a subfolder?" Everything behaves well when it's at the document root of the server it's on, but strange things start happening when it's anywhere below that. There's been server people that have posted solutions, and another can be added to them - this new post from Alexander Netkachev.

This question I had heard many times and now I have a few minutes to write down the answer so that everybody who stuck in the similar trouble could quickly resolve the issue. Who works with Zend Framework, most likely, have read the "Zend_Controller / Getting Started" Zend Framework manual article, which explains how to use Zend_Controller in the root folder of the web server. But it does not answer on the "How to run my Zend Framework application in a subfolder of the web server document folder?" question and I propose you my solutions.

First is rather a hack then a recommended solution, but with it you can start the applications and examples that use standard router. The second is neater but it depends on the Zend_Controller_RewriteRouter class.

The first method makes some changes to the default routing code itself (the hack) to make it no longer just use the REQUEST_URI, but to look at more of the URL to see if subdirectories exist. OF course, the more preferred way to go, and just as simple of an option, is using the framework itself to change the RewriteRouter options to allow for the subdirectory.

tagged: zend framework zend_controller rewriterouter router zend framework zend_controller rewriterouter router

Link:

Nick Lo's Blog:
RewriteRouter and Zend_Config play together
Jul 18, 2006 @ 11:07:38

Nick Lo (author of the now infamous Mr Dizzy story on getters/setters in constructors) brings us another new tutorial for working with the Zend Framework, getting the RewriteRouter and Zend_Config to play nicely together.

While getting the hang of the Zend_Controller_RewriteRouter, which is now included in Zend Framework 0.1.5, I was adding the routes in my index.php (bootstrap) file and wondered if there was any way of storing them elsewhere. It is possible to loop over Zend_Controller_RewriteRouter::addRoutes() but the method I will describe here is based on some recent updates to Zend_Controller_RewriteRouter by its author Michael Minicki.

His example shows the creation of some simple routes with this new functionality - creating the route definitions, loading them in, creating the object for them, and passing it into the front controller. It's as simple as that!

tagged: zend framework rewriterouter zend_config tutorial zend framework rewriterouter zend_config tutorial

Link:

Nick Lo's Blog:
RewriteRouter and Zend_Config play together
Jul 18, 2006 @ 11:07:38

Nick Lo (author of the now infamous Mr Dizzy story on getters/setters in constructors) brings us another new tutorial for working with the Zend Framework, getting the RewriteRouter and Zend_Config to play nicely together.

While getting the hang of the Zend_Controller_RewriteRouter, which is now included in Zend Framework 0.1.5, I was adding the routes in my index.php (bootstrap) file and wondered if there was any way of storing them elsewhere. It is possible to loop over Zend_Controller_RewriteRouter::addRoutes() but the method I will describe here is based on some recent updates to Zend_Controller_RewriteRouter by its author Michael Minicki.

His example shows the creation of some simple routes with this new functionality - creating the route definitions, loading them in, creating the object for them, and passing it into the front controller. It's as simple as that!

tagged: zend framework rewriterouter zend_config tutorial zend framework rewriterouter zend_config tutorial

Link:


Trending Topics: