1
application
|-Payment
| | +--Item
| |   +---Footer.php
| +--Manager.php
|-Boostrap.php

In application/Boostrap.php I want to init Payment module like this:

protected function _initPaymentManager()
{
    $manager = Payment_Manager::getInstance();  
    $manager->registerHandler(new Payment_Item_Footer());   
}

But the framework have not loaded Payment module yet. How can I call classes in Payment module in application/Bootstrap.php?

1 Answer 1

1

To ensure that the modules resource is loaded first, add:

$this->bootstrap('modules');

to the start of your _initPaymentManager method.

You'll also need a Bootstrap.php in the application/Payment/ folder.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.