Fruit RouteKit
Route kit of Fruit Framework
|
Public Member Functions | |
generate () | |
Interceptor defines an interface for you to do something before executing controller.
Interceptor can work with only controller class. If you use function as controller, that would not be interceptable.
RouteKit will use var_export to compile Interceptor, be sure you have __set_state() method defined if needed.
Definition at line 12 of file Interceptor.php.
generate | ( | ) |
generate() generates an function, which accepts three parameters: raw url, instance of matched class and method. You can do some modifications to that controller instance in the function, but not subtitude it.
You can also add type-hinting on the instance, so only that kind of object will pass to your interception function.