indigophp / fuel-module
Extension to Fuel Module class
Installs: 17
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:fuel-package
pkg:composer/indigophp/fuel-module
Requires
- composer/installers: ~1.0
This package is not auto-updated.
Last update: 2022-02-01 12:38:06 UTC
README
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:
- Uri modawill route toModa\Controller_Modbin modulemoda
- Uri moda/modbwill route toModa\Modb\Controller_Modbin modulemoda_modb
- Uri moda/modb/modcwill route toModa\Modb\Controller_Modcin modulemoda_modb
If moda contains a Controller_Modb (according to load order):
- Uri modawill route toModa\Controller_Modbin modulemoda
- Uri moda/modbwill route toModa\Controller_Modbin modulemoda
- Uri moda/modb/modcwill route toModa\Controller_Modb(actionmodc) in modulemoda
Fallbacks are processed in a reverse order:
- Uri moda/modb/fakewill route toModa\Modb\Controller_Modb(actionfake) in modulemodb
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.