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 5994885
In Process

The Archive Base Latest Questions

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

I have been working on a new installation of a Zend Framework application for

  • 0

I have been working on a new installation of a Zend Framework application for a while now, and I cannot figure out what’s going on. I have two custom action helpers I would like to use and I would like to initialize those in the bootstrap. But it seems as though my _init functions are not being called at all. In the index.php that starts the application I have:

require('Zend/Application.php');

$app = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH 
.'/configs/application.ini');

$app->bootstrap()->run();

Here’s what I have in the application.ini file:

[production]

appnamespace = "Application_Name"

includePaths.library = APPLICATION_PATH "/../library"

bootstrap.path = "/home/user/website/includes/library/Application_Name/Resource/Bootstrap.php"

bootstrap.class = "Bootstrap"

resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"

resources.view[] =

autoloaderNamespaces[] = "Application_Name"

pluginPaths.Application_Name_Resource = "Application_Name/Resource"

I know the application is somewhat working because it is using a layout that I have and I can do things in the controllers and views and have it output to the page. I also know that it is at least looking at the Bootstrap file because I can make a PHP error happen when I leave out an end curly brace.

Here’s a portion of my Bootstrap file:

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

        public function _init()
        {
                Zend_Controller_Action_HelperBroker::addPrefix(new Application_Name_Controller_Action_Helper_ResourceInjector());
                Zend_Controller_Action_HelperBroker::addPrefix(new Application_Name_Controller_Action_Helper_Em());
        }

Any ideas why this would be or see something that I’ve messed up in my configuration? I’ve looked at tens of tutorials on how to configure Zend, and no one else seems to have this problem.

  • 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:52:53+00:00Added an answer on May 22, 2026 at 11:52 pm

    You’re not using the helper broker correctly. addPrefix() is used to add pluginloader prefix paths, not actual classes.

    If you want to add concrete helpers (to use their dispatch hooks presumably), then place something like this in your Bootstrap class

    protected function _initActionHelpers()
    {
        $helper = new My_Helper;
        Zend_Controller_Action_HelperBroker::addHelper($helper);
    }
    

    For regular, runtime helpers, you can easily add prefix paths in your config, eg

    resources.frontController.actionHelperPaths.ProEquipTrack_Controller_Action_Helper = "ProEquipTrack/Controller/Action/Helper"
    

    These will be automatically loaded by the broker at call time, eg (controller context)

    $resourceInjector = $this->getHelper('ResourceInjector');
    $em = $this->getHelper('Em');
    

    or using the strategy pattern (direct() method)

    $this->_helper->resourceInjector($arg1, $arg2 /*, etc */);
    

    Doctrine Entity Manager

    Do something like this in your Bootstrap class

    protected function _initDoctrine()
    {
        // initialise and create entity manager
        $em = // whatever
    
        return $em;
    }
    

    You can now access the entity manager in your controllers using this

    $em = $this->getInvokeArg('bootstrap')
               ->getResource('doctrine');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on test framework, which creates a new app domain to
I have been working with Qt and Visual Studios 2008 for a while now.
I have been working on a new project for a little while and already
I have been working on the project where application is using grails 1.2.2.... Now
Alright have been working to switch to jQuery 1.7's new and improved .on() function
I have been working on Eclipse recently. I am fairly new to java programming,
I'm new to AS3 and have been working on an XML driven navigation system
I am very new to JS, have been working in C/C++ before, I need
I'm already new in C++CLI , although I have been working on VB and
I am new to Spring Security. I have been working on creating a custom

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.