Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Packages and modules
  • 1) Is there a way to move a module into a package

    2) Is there a way to override classes from modules from a package inside the app?
  • You can absolutely override package classes (or any other) from within the app.  
    Look in your app/bootstrap.php file.
    You will need to define inside that file what you are overriding.
    There is a commented out example in the file.



  • HarroHarro
    Accepted Answer
    1. Add a modules folder to the package, and in the package bootstrap, add that folder to your config's module_paths list. When you (always) load the package, the module path will be added automatically.

    2. No (sorry, Mike). In Fuel, you can only override what has been aliased, which means core classes, and any namespace that has been aliased to global (like for example the Auth package).

    If you want to capture a request for a module Controller and route that elsewhere, you could use route definitions for that.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion