News Feed
Sections




News Archive
feed this:

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

Robert Basic's Blog:
Grouping Zend Framework controllers in subdirectories
April 18, 2011 @ 09:08:25

Robert Basic has a new post today showing you how you can group your controllers in your Zend Framework application into subdirectories for easier organization.

Thanks to a discussion on the Zend Framework mailing list I learned about a new feature, a feature that allows for grouping action controllers in subdirectories! Well, this is more of an unknown and undocumented feature than new, as it is the part of the framework for at least 3 years. Why am I so hyped about this? Because it allows for better code organisation on larger projects. Heck, it might be useful on smaller ones too.

He gives an example of how it might be laid out and a few helpful hints he learned when trying it out:

  • The subdirectory separator in the URI is the underscore and not the slash.
  • The subdirectory name is uppercase: Subdirectory, not subdirectory. In the URI it's lowercase.
  • The view directories for these subdirectories are lowercased, and not uppercase.
0 comments voice your opinion now!
zendframework controller subdirectory group


SaniSoft Blog:
Help! vendor() is deprecated.
May 12, 2008 @ 09:35:48

On the SaniSoft blog today, Tarique Sani has a quick hack for CakePHP users needing to transition over from the deprecated vendor() call - import().

Use of vendor() function to load third party libs in CakePHP has been deprecated for some time now... It has been replaced with the more generic App::import() the usage is simple.

There's also a little trick you'll need to know for files with underscores (drop it and replace with an uppercase) and how to get it to be a bit more flexible and recognize vendor files in subdirectories or ones differently named.

0 comments voice your opinion now!
vendor cakephp framework deprecated trick underscore subdirectory


Antoine Ughetto's Blog:
Easy way to find a file in subdirectory with php
February 18, 2008 @ 11:15:00

Antoine Ughetto has posted an easy way to find a file inside any series of subdirectories with PHP:

I've made a previus post on SPL using RecursiveIterator to parse Array. Today we will use this same RecursiveIterator with a DirectoryRecursiveIterator.

The code is pretty simple and straight forward - a DirectorySearch class that takes in the directory name and recurses through the files and subdirectories to locate the file you're looking for.

0 comments voice your opinion now!
directoryrecursiveiterator find file subdirectory


The Bakery:
LightTPD and CakePHP setup in subdirectories
January 18, 2007 @ 10:04:00

In this new tutorial over on The Bakery, Anton Bobrov walks you through a process he discovered to get LightTPD and CakePHP setup in a subdirectory on his site.

I faced the challenge to install CakePHP under LightTPD. All works smoothly as long as I deploy projects in document root of domain. But when I want to setup CakePHP in subdir all goes wrong.

Basically, the tutorial involves changing some configuration options in the lighttpd to help it understand the correct routing for the CakePHP application. He even includes a download of the updates to make a drag & drop upgrade easier.

1 comment voice your opinion now!
lightthpd cakephp framework subdirectory configuration lightthpd cakephp framework subdirectory configuration


Ligaya Turmelle's Blog:
Quick snip (or Zend Framework in a Subdirectory)
December 06, 2006 @ 09: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.

0 comments voice your opinion now!
zend framework subdirectory rewriterouter rewritebase router zend framework subdirectory rewriterouter rewritebase router


Dmytro Shteflyuk's Blog:
Zend Framework - Router for subdirectory-based site
March 08, 2006 @ 07:36:39

Dmytro Shteflyuk has posted some his his experiences with the Zend Framework already, specifically in dealing with subdirectory issues.

I started discovering of Zend Framework and was confronted with a problem. When I've placed my test sample into site's subdirectory (http://localhost/test/), default router tried to find TestController which is not exists of course and routed me to IndexController/noRoute. It's not good for me. I decided to create my own router.

He gives the code he created to make the routing system work, using the Zend_Controller_Router_Interface and Zend_Controller_Front packages to handle the incoming requests.

0 comments voice your opinion now!
zend framework router subdirectory site zend framework router subdirectory site



Community Events





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


framework introduction interview community project application threedevsandamaybe library list code bugfix api language wordpress configure series developer podcast laravel release

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