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
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
moda
will route toModa\Controller_Modb
in modulemoda
- Uri
moda/modb
will route toModa\Modb\Controller_Modb
in modulemoda_modb
- Uri
moda/modb/modc
will route toModa\Modb\Controller_Modc
in modulemoda_modb
If moda
contains a Controller_Modb
(according to load order):
- Uri
moda
will route toModa\Controller_Modb
in modulemoda
- Uri
moda/modb
will route toModa\Controller_Modb
in modulemoda
- Uri
moda/modb/modc
will route toModa\Controller_Modb
(actionmodc
) in modulemoda
Fallbacks are processed in a reverse order:
- Uri
moda/modb/fake
will 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.