Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8131415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:05:08+00:00 2026-06-06T09:05:08+00:00

Zend recommends to put controller action helpers in the mvc into /application/controllers/helpers . Is

  • 0

Zend recommends to put controller action helpers in the mvc into /application/controllers/helpers. Is that the right way to use those?

Do I have to instantiate them in the bootstrap/application.ini?

My helper has a direct action and is called Controllers_Helpers_Redirectlogin.

Thanks for your help, I appreciate!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:05:09+00:00Added an answer on June 6, 2026 at 9:05 am

    Following the recommendation is good. By default, it doesn’t appear that the autoloader is set up to look in the recommended paths by default even though the manual page you referenced states:

    controllers/helpers/: These directories will contain action helpers.
    Action helpers will be namespaced either as “Controller_Helper_” for
    the default module or “_Controller_Helper” in other modules.

    To get around it, just hint to the HelperBroker the additional paths to look in by adding this to your Bootstrap.php file:

    // for default module in a non-modular structure
    Zend_Controller_Action_HelperBroker::addPath(
        APPLICATION_PATH . '/controllers/helpers',
        'Controller_Helper'
    );
    
    // for default module if using modular structure
    Zend_Controller_Action_HelperBroker::addPath(
        APPLICATION_PATH . '/modules/default/controllers/helpers',
        'Controller_Helper'
    );
    
    // for "Admin" module when using a modular structure
    Zend_Controller_Action_HelperBroker::addPath(
        APPLICATION_PATH . '/modules/admin/controllers/helpers',
        'Admin_Controller_Helper'
    );
    

    Also note, for the autoloader to work correctly, you should name your class Controller_Helper_RedirectLogin rather than Controllers_Helpers_RedirectLogin. Usually autoloaded classes drop the plurals (e.g. models/User.php maps to class Model_User).

    EDIT: You can also tell the helper broker about the helper paths in the application.ini file as well. Example:

    ; non-modular structure
    resources.frontController.actionHelperPaths.Controller_Helper = APPLICATION_PATH "/controllers/helpers"
    
    ; "admin" module in a modular structure
    resources.frontController.actionHelperPaths.Admin_Controller_Helper = APPLICATION_PATH "/modules/admin/controllers/helpers"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Zend Framework: I have the following url /base/url/[number]/[string] OR /base/url/action/controller/param/value I want in the
Part 1 I want to build a PHP Zend Framework application that users can
Zend Framework 1.11.11 I am writing a Zend Framework Controller Plugin that does stuff
When using the normal architecture (I guess it's called controller-based architecture), zend recommends the
Examining Zend Framework, I found that all setter methods (of those I’ve examined) return
Using Zend Framework, I've created a Model to insert a record into a database.
The zend framework provides a php wrapper for the amazon S3 api that simplifies
In the Zend Framework Quickstart , there has been a change from models that
in Zend Framework, whats the best way or recommended way to show or hide
In Zend Framework, I have a common use case where I need to propagate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.