-
Notifications
You must be signed in to change notification settings - Fork 30
Directives
MATSUMOTO, Ryosuke edited this page Mar 4, 2014
·
13 revisions
The Directive which be implemented by mod_mruby is as follows.
| Directive | Hook Function | Hook Ordering |
|---|---|---|
| mrubyPostReadRequestFirst | ap_hook_post_read_request | APR_HOOK_FIRST |
| mrubyPostReadRequestMiddle | ap_hook_post_read_request | APR_HOOK_MIDDLE |
| mrubyPostReadRequestLast | ap_hook_post_read_request | APR_HOOK_LAST |
| mrubyQuickHandlerFirst | ap_hook_quick_handler | APR_HOOK_FIRST |
| mrubyQuickHandlerMiddle | ap_hook_quick_handler | APR_HOOK_MIDDLE |
| mrubyQuickHandlerLast | ap_hook_quick_handler | APR_HOOK_LAST |
| mrubyTranslateNameFirst | ap_hook_translate_name | APR_HOOK_FIRST |
| mrubyTranslateNameMiddle | ap_hook_translate_name | APR_HOOK_MIDDLE |
| mrubyTranslateNameLast | ap_hook_translate_name | APR_HOOK_LAST |
| mrubyMapToStorageFirst | ap_hook_map_to_storage | APR_HOOK_FIRST |
| mrubyMapToStorageMiddle | ap_hook_map_to_storage | APR_HOOK_MIDDLE |
| mrubyMapToStorageLast | ap_hook_map_to_storage | APR_HOOK_LAST |
| mrubyAccessCheckerFirst | ap_hook_access_checker | APR_HOOK_FIRST |
| mrubyAccessCheckerMiddle | ap_hook_access_checker | APR_HOOK_MIDDLE |
| mrubyAccessCheckerLast | ap_hook_access_checker | APR_HOOK_LAST |
| mrubyCheckUserIdFirst | ap_hook_check_user_id | APR_HOOK_FIRST |
| mrubyCheckUserIdMiddle | ap_hook_check_user_id | APR_HOOK_MIDDLE |
| mrubyCheckUserIdLast | ap_hook_check_user_id | APR_HOOK_LAST |
| mrubyAuthCheckerFirst | ap_hook_auth_checker | APR_HOOK_FIRST |
| mrubyAuthCheckerMiddle | ap_hook_auth_checker | APR_HOOK_MIDDLE |
| mrubyAuthCheckerLast | ap_hook_auth_checker | APR_HOOK_LAST |
| mrubyFixupsFirst | ap_hook_fixups | APR_HOOK_FIRST |
| mrubyFixupsMiddle | ap_hook_fixups | APR_HOOK_MIDDLE |
| mrubyFixupsLast | ap_hook_fixups | APR_HOOK_LAST |
| mrubyInsertFilterFirst | ap_hook_insert_filter | APR_HOOK_FIRST |
| mrubyInsertFilterMiddle | ap_hook_insert_filter | APR_HOOK_MIDDLE |
| mrubyInsertFilterLast | ap_hook_insert_filter | APR_HOOK_LAST |
| mrubyHandler | ap_hook_handler | APR_HOOK_REALLY_FIRST |
| mrubyLogTransactionFirst | ap_hook_log_transaction | APR_HOOK_FIRST |
| mrubyLogTransactionMiddle | ap_hook_log_transaction | APR_HOOK_MIDDLE |
| mrubyLogTransactionLast | ap_hook_log_transaction | APR_HOOK_LAST |
-
APR_HOOK_REALLY_FIRST ・・・ run this hook first, before ANYTHING
-
APR_HOOK_FIRST ・・・ run this hook first
-
APR_HOOK_MIDDLE ・・・ run this hook somewhere
-
APR_HOOK_LAST ・・・ run this hook after every other hook which is defined
-
APR_HOOK_REALLY_LAST ・・・ run this hook last, after EVERYTHING
Description : Provide a hook for the post_read_request phase of request processing
Hook Function : post_read_request
Hook Ordering : APR_HOOK_FIRST
Syntax : mrubyPostReadRequestFirst /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the post_read_request phase of request processing
Hook Function : post_read_request
Hook Ordering : APR_HOOK_MIDDLE
Syntax : mrubyPostReadRequestMiddle /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the post_read_request phase of request processing
Hook Function : post_read_request
Hook Ordering : APR_HOOK_Last
Syntax : mrubyPostReadRequestLast /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the quick_handler phase of request processing
Hook Function : quick_handler
Hook Ordering : APR_HOOK_FIRST
Syntax : mrubyQuickHandlerFirst /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the quick_handler phase of request processing
Hook Function : quick_handler
Hook Ordering : APR_HOOK_MIDDLE
Syntax : mrubyQuickHandlerMiddle /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the quick_handler phase of request processing
Hook Function : quick_handler
Hook Ordering : APR_HOOK_Last
Syntax : mrubyQuickHandlerLast /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the translate_name phase of request processing
Hook Function : translate_name
Hook Ordering : APR_HOOK_FIRST
Syntax : mrubyTranslateNameFirst /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the translate_name phase of request processing
Hook Function : translate_name
Hook Ordering : APR_HOOK_MIDDLE
Syntax : mrubyTranslateNameMiddle /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the translate_name phase of request processing
Hook Function : translate_name
Hook Ordering : APR_HOOK_Last
Syntax : mrubyTranslateNameLast /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the map_to_storage phase of request processing
Hook Function : map_to_storage
Hook Ordering : APR_HOOK_FIRST
Syntax : mrubyMapToStorageFirst /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the map_to_storage phase of request processing
Hook Function : map_to_storage
Hook Ordering : APR_HOOK_MIDDLE
Syntax : mrubyMapToStorageMiddle /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the map_to_storage phase of request processing
Hook Function : map_to_storage
Hook Ordering : APR_HOOK_Last
Syntax : mrubyMapToStorageLast /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the access_checker phase of request processing
Hook Function : access_checker
Hook Ordering : APR_HOOK_FIRST
Syntax : mrubyAccessCheckerFirst /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the access_checker phase of request processing
Hook Function : access_checker
Hook Ordering : APR_HOOK_MIDDLE
Syntax : mrubyAccessCheckerMiddle /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the access_checker phase of request processing
Hook Function : access_checker
Hook Ordering : APR_HOOK_Last
Syntax : mrubyAccessCheckerLast /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the check_user_id phase of request processing
Hook Function : check_user_id
Hook Ordering : APR_HOOK_FIRST
Syntax : mrubyCheckUserIdFirst /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the check_user_id phase of request processing
Hook Function : check_user_id
Hook Ordering : APR_HOOK_MIDDLE
Syntax : mrubyCheckUserIdMiddle /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the check_user_id phase of request processing
Hook Function : check_user_id
Hook Ordering : APR_HOOK_Last
Syntax : mrubyCheckUserIdLast /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the auth_checker phase of request processing
Hook Function : auth_checker
Hook Ordering : APR_HOOK_FIRST
Syntax : mrubyAuthCheckerFirst /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the auth_checker phase of request processing
Hook Function : auth_checker
Hook Ordering : APR_HOOK_MIDDLE
Syntax : mrubyAuthCheckerMiddle /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the auth_checker phase of request processing
Hook Function : auth_checker
Hook Ordering : APR_HOOK_Last
Syntax : mrubyAuthCheckerLast /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the fixups phase of request processing
Hook Function : fixups
Hook Ordering : APR_HOOK_FIRST
Syntax : mrubyFixupsFirst /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the fixups phase of request processing
Hook Function : fixups
Hook Ordering : APR_HOOK_MIDDLE
Syntax : mrubyFixupsMiddle /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the fixups phase of request processing
Hook Function : fixups
Hook Ordering : APR_HOOK_Last
Syntax : mrubyFixupsLast /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the insert_filter phase of request processing
Hook Function : insert_filter
Hook Ordering : APR_HOOK_FIRST
Syntax : mrubyInsertFilterFirst /path/to/script.mrb
Type : VOID
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the insert_filter phase of request processing
Hook Function : insert_filter
Hook Ordering : APR_HOOK_MIDDLE
Syntax : mrubyInsertFilterMiddle /path/to/script.mrb
Type : VOID
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the insert_filter phase of request processing
Hook Function : insert_filter
Hook Ordering : APR_HOOK_Last
Syntax : mrubyInsertFilterLast /path/to/script.mrb
Type : VOID
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the handler phase of request processing
Hook Function : handler
Hook Ordering : APR_HOOK_REALLY_FIRST
Syntax : mrubyHandler /path/to/script.mrb
Type : RUN_FIRST
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the log_transaction phase of request processing
Hook Function : log_transaction
Hook Ordering : APR_HOOK_FIRST
Syntax : mrubyLogTransactionFirst /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the log_transaction phase of request processing
Hook Function : log_transaction
Hook Ordering : APR_HOOK_MIDDLE
Syntax : mrubyLogTransactionMiddle /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
Description : Provide a hook for the log_transaction phase of request processing
Hook Function : log_transaction
Hook Ordering : APR_HOOK_Last
Syntax : mrubyLogTransactionLast /path/to/script.mrb
Type : RUN_ALL
Module : mod_mruby
Compatibility : 2.2 , 2.4
-
VOID ・・・ Implement a hook that has no return code, and therefore runs all of the registered functions.
-
RUN_ALL ・・・ Implement a hook that runs until one of the functions returns something other than OK or DECLINE.
-
RUN_FIRST ・・・ Implement a hook that runs until the first function returns something other than the value of decline.