Zend Framework

Module name mapping from URI to directory

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.5.1
  • Fix Version/s: 1.5.2
  • Component/s: Zend_Controller
  • Labels:
    None
  • Fix Version Priority:
    Should Have

Description

Not sure if case-sensitive comparison is an intentional behavior; if it is, would it make sense to add an extra argument to allow mapping the module name case-insensitively from the URI to the physical module directory on the file system?

$zcf = Zend_Controller_Front::getInstance();

$zcf->setParam('noViewRenderer', true);
$zcf->setParam('prefixDefaultModule', true);
$zcf->setModuleControllerDirectoryName('.');
$zcf->addModuleDirectory('/path/to/module/directory');
$zcf->dispatch();
module/
|-- default/
|   |-- ErrorController.php
|   `-- IndexController.php
`-- module1/
    `-- IndexController.php

http://somewhere/module1 hits the IndexController in the module1 directory
http://somewhere/Module1 hits the ErrorController in the default module directory

Some users type everything capitalized, and since MODULE1 !== module1 (I'm gussing isValidModule() returns false); the request doesn't go to the intended controller.

If this is an intentional behavior; what's the best way to overcome this? Create a custom dispatcher, or perhaps this can be worked around by configuring the router?

Eric

Issue Links

Activity

Hide
Wil Sinclair added a comment -

Please evaluate and categorize/assign as necessary.

Show
Wil Sinclair added a comment - Please evaluate and categorize/assign as necessary.
Hide
Matthew Weier O'Phinney added a comment -

Scheduling for next mini release.

Show
Matthew Weier O'Phinney added a comment - Scheduling for next mini release.
Hide
Matthew Weier O'Phinney added a comment -

Resolved in trunk and 1.5 release branch as of r9408

Show
Matthew Weier O'Phinney added a comment - Resolved in trunk and 1.5 release branch as of r9408

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
30m
Original Estimate - 30 minutes
Remaining:
30m
Remaining Estimate - 30 minutes
Logged:
Not Specified
Time Spent - Not Specified