Zend_Application issue with extending Frontcontroller and using extended Frontcontroller application resource

I extended the Zend Frontcontroller with a personal one and also extended the frontcontroller application resource to use my personal front controller. All it basically does for the moment is assign the front variable within the application resource method getFrontController to my personal front controller. Lastly, I added the pluginpaths variable within application.ini to use my personal Application Resources. In any case, I'm getting the Zend Frontcontroller returned to me instead of my personal one. Anybody know why my personal application frontcontroller resource isnt being used? `

Answers


Since Zend_Controller_Front is a singleton, you will also need to override the getInstance() method to ensure it creates an instance of your class instead of the base class. You can just cut and paste the method to do this:

public static function getInstance()
{
    if (null === self::$_instance) {
        self::$_instance = new self();
    }

    return self::$_instance;
}

Need Your Help

ASP.NET Custom Server Control not refreshing in designer

c# asp.net visual-studio-2010 designer custom-server-controls

I have a written an ASP.NET Custom Server Control, which I have working. This control inherits from CompositeControl and has different views that it can show during its life time. The best analogy ...