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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:37:12+00:00 2026-05-23T12:37:12+00:00

I have created a plugins directory in the application directory. Currently I am loading

  • 0

I have created a plugins directory in the application directory.

Currently I am loading the plugins like so:

protected function _initAccessCheck()
{ 
    include('../application/plugins/AccessCheck.php');
    $fc = Zend_Controller_Front::getInstance();
    $fc->registerPlugin( new Plugin_AccessCheck() );
}

What would I have to do so I would not have to use the include function? Many thanks in advance.

  • 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-23T12:37:12+00:00Added an answer on May 23, 2026 at 12:37 pm

    Zend_Loader_Autoloader_Resource allows you to define a mapping between file paths and class names. This allows you to autoload classes whose files are not stored on the include path.

    Typically, you would use the subclass Zend_Application_Module_Autoloader which sets up some common mappings for models, forms, etc. In particular, it has an entry for plugins. In Bootstrap, it would be something like this:

    protected function _initResourceLoader()
    {
        $resourceLoader = new Zend_Application_Module_Autoloader(array(
            'namespace' => 'Application',
            'basePath' => APPLICATION_PATH,
        ));
        return $resourceLoader;
    }
    

    Then a class named Application_Plugin_MyPlugin would reside in the file application/plugins/MyPlugin.php.

    In your specific circumstance, it looks like you are using an empty namespace. So your’s would be:

    protected function _initResourceLoader()
    {
        $resourceLoader = new Zend_Application_Module_Autoloader(array(
            'namespace' => '',
            'basePath' => APPLICATION_PATH,
        ));
    
        return $resourceLoader;
    }
    

    Then your plugin class Plugin_AccessCheck would reside in the file application/plugins/AccessCheck.php.

    Just make sure that the resource loader is created before you instantiate/register your plugins:

    protected function _initAccessCheck()
    { 
        $this->booststrap('resourceLoader');
        $fc = Zend_Controller_Front::getInstance();
        $fc->registerPlugin( new Plugin_AccessCheck() );
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an Eclipse plugin which creates a view in Eclipse. Currently it
I have created a template for Visual Studio 2008 and it currently shows up
I have created a c# 2.0 WinForm application which loads dlls, searches for an
I have an exploded directory that I am editing in eclipse (created via setting
I have a Flex/Java web application that uses Maven as a build tool. Currently,
I am creating quite a complex web application. I like to use php to
I have created a simple WordPress plugin that automatically sets my new sites up
I am using the jQuery Tools Scrollable plugin - http://flowplayer.org/tools/scrollable.html#navigator I have created a
Have created a c++ implementation of the Hough transform for detecting lines in images.
MSCRM 4.0 Problem: I'm currently storing xml files in the ISV directory along with

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.