A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2008 yearZend_Controller Following PEAR Naming Convention - page 1
User InfoPosts
Zend_Controller Following PEAR Naming Convention#1
I am developing a web-app using zend framework. I like how all the autoloading works however I don't really like the way Zend_Controller names the controllers by default. I am looking for a way to enable zend_controller to understand my controller class named Controller_User stored in {$app}/Controller/User.php . Is there anyway I can do this with least amount of extra code?

posted date: 2008-12-18 07:54:00


Re: Zend_Controller Following PEAR Naming Convention#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2008-12-18 07:54:01


Re: Zend_Controller Following PEAR Naming Convention#3
This is certainly not a step-by-step answer, but I believe you can accomplish what you want by subclassing the standard dispatcher class, and making a few changes to the functions that deal with the controller directory and controller objects. ZF Ref Guide - Subclassing Dispatcher

posted date: 2008-12-18 09:27:00


Re: Zend_Controller Following PEAR Naming Convention#4
a subclassed dispatcher ( quoted from http://cslai.coolsilon.com/2009/03/28/extending-zend-framework/ )class Coolsilon_Controller_Dispatcher extends Zend_Controller_Dispatcher_Standard { public function __construct() { parent::__construct(); } public function formatControllerName($unformatted) { return sprintf( 'Controller_%s', ucfirst($this->_formatName($unformatted)) ); } public function formatActionName($unformatted) { $formatted = $this->_formatName($unformatted, true); return strtolower(substr($formatted, 0, 1)) . substr($formatted, 1); } }

posted date: 2009-03-29 23:52:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.