indigophp/fuel-module

This package is abandoned and no longer maintained. No replacement package was suggested.

Extension to Fuel Module class

dev-develop 2014-08-15 01:46 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:38:06 UTC


README

Latest Stable Version Total Downloads License

This package is an extension to Fuel Module class.

Install

Via Composer

{
    "require": {
        "indigophp/fuel-module": "@stable"
    }
}

Note: This package cannot be used with indigophp/fuel-core <1.0.3.

Usage

Load this package before any other package that uses one of the following: Module, Request, Router

Make sure that your extensions of these classes does not override them.

See examples for custom modules.

Note: The modules are processed alphabetically (in the order they are loaded). The first controller found will be routed.

Depending on the examples, here are some scenarios:

  1. Uri moda will route to Moda\Controller_Modb in module moda
  2. Uri moda/modb will route to Moda\Modb\Controller_Modb in module moda_modb
  3. Uri moda/modb/modc will route to Moda\Modb\Controller_Modc in module moda_modb

If moda contains a Controller_Modb (according to load order):

  1. Uri moda will route to Moda\Controller_Modb in module moda
  2. Uri moda/modb will route to Moda\Controller_Modb in module moda
  3. Uri moda/modb/modc will route to Moda\Controller_Modb (action modc) in module moda

Fallbacks are processed in a reverse order:

  1. Uri moda/modb/fake will route to Moda\Modb\Controller_Modb (action fake) in module modb

Extending classes

You can extend 'Indigo\Fuel\Module' class to use your own namespace, URL prefix and default controller name. See get_namespace, get_prefix and get_controller functions.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.