class documentation
class RequestComponent: (source)
Implements interfaces: klein.interfaces.IDependencyInjector
, klein.interfaces.IRequiredParameter
Require a hyperlink DecodedURL
object from a Requirer
.
Present Since | |
Klein NEXT |
Method | finalize |
Nothing to do upon finalization. |
Method | inject |
Return a value to be injected into the parameter name specified by the IRequiredParameter. This may return a Deferred, or an object, or an object directly providing the relevant interface. |
Method | register |
Register the given injector at method-decoration time, informing it of its Python parameter name. |
Class Variable | interface |
Undocumented |
Return a value to be injected into the parameter name specified by the IRequiredParameter. This may return a Deferred, or an object, or an object directly providing the relevant interface.
Parameters | |
instance:Any | The instance to which the Klein router processing this request is bound. |
request:IRequest | The request being processed. |
routeDict[ | A (read-only) copy of the the arguments passed to the route by the layer below dependency injection (for example, URL parameters). |
Returns | |
DecodedURL | Undocumented |
Register the given injector at method-decoration time, informing it of its Python parameter name.
Parameters | |
injectionComponentized | Undocumented |
parameterstr | Undocumented |
requestIRequestLifecycle | Undocumented |
lifecycle | An IRequestLifecycle provider which contains hooks that will be run before and after each request. If this injector has shared per-request dependencies that need to be executed before or after the request is processed, this method should attach them to those lists. These hooks are supplied here rather than relying on injectValue to run the requisite logic each time so that DependencyInjectors may cooperate on logic that needs to be duplicated, such as provisioning a session. |
Returns | |
IDependencyInjector | Undocumented |
Note | |
this happens at route definition time, after all other injectors have been registered by IRequiredParameter.registerInjector . |