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

  • Home
  • SEARCH
  • 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 5993657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:42:23+00:00 2026-05-22T23:42:23+00:00

In my module bootstrap: <?php class Api_Bootstrap extends Zend_Application_Module_Bootstrap { protected function _initAllowedMethods() {

  • 0

In my module bootstrap:

<?php

class Api_Bootstrap extends Zend_Application_Module_Bootstrap
{
    protected function _initAllowedMethods()
    {
        $front = Zend_Controller_Front::getInstance();
        $front->setParam('api_allowedMethods', array('POST'));
    }

    protected function _initActionHelperBrokers()
    {
        Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/modules/api/controllers/helpers', 'Api_Controller_Action_Helper_');

        Zend_Controller_Action_HelperBroker::addHelper(new Api_Controller_Action_Helper_Model());
    }
}

There is a Api_Controller_Action_Helper_Model at /var/www/project/application/modules/api/controller/helpers/Model.php

But I get:

PHP Fatal error:  Class 'Api_Controller_Action_Helper_Model' not found in /var/www/accounts.amh.localhost/application/modules/api/Bootstrap.php on line 15

As far as I can tell from the API and http://akrabat.com/zend-framework/using-action-helpers-in-zend-framework/ this should work.

I’m pretty sure this isn’t a bootstrapping issue like I have had before, as I am specifically add the path/prefix right before trying to add the helper.

What else might I have missed?

  • 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-05-22T23:42:24+00:00Added an answer on May 22, 2026 at 11:42 pm

    The problem here is that the module autoloader does not know about controller action helper resources.

    Try something like this in your module bootstrap

    protected function _initResourceLoader()
    {
        $resourceLoader = $this->getResourceLoader();
    
        $resourceLoader->addResourceType('actionhelper',
                'controllers/helpers', 'Controller_Action_Helper');
    }
    

    All that being said, as your helper has an empty constructor, you could omit the addHelper() line and just let the broker automatically create it when requested in your controllers, eg

    $helper = $this->getHelper('Model');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

bootstrap.php define('ROOT_DIR', dirname(__FILE__)); require_once('Zend/Controller/Front.php'); $front = Zend_Controller_Front::getInstance(); $front->addModuleDirectory(ROOT_DIR . '/application/modules'); $front->dispatch(); application/modules/controllers/IndexController.php class IndexController
I have this in my bootstrap: protected function _initAutoload() { $this->_auth = Zend_Auth::getInstance(); $this->_acl
Guys I have the following structure in my project. application/ Bootstrap.php configs/ application.ini modules/
I have this routing defined in my module's init.php; Route::set('store', 'store/<store_id>(/<controller>(/<action>(/<id>)))', array( 'store_id' =>
I've got a class library in defined here .../projectname/library/Me/Myclass.php defined as follows: <?php class
I have in my bootstrap public function initRoutes() { $router = new Zend_Controller_Router_Rewrite(); $route
I'm getting Fatal error: Class 'Form_Login' not found in /route/to/project/application/controllers/AuthController.php on line XX when
module Superpower # instance method def turn_invisible ... end # module method def Superpower.turn_into_toad
A module can be unloaded, so how can I tell for sure if it
this module does a good job at creating a tagcloud block - all good

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.