use `resource' as generic name for uri or uri_template

This commit is contained in:
Jocelyn Fiat
2011-09-07 12:46:09 +02:00
parent 2244d101ea
commit 54dc7de189
3 changed files with 7 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ deferred class
REQUEST_ROUTER REQUEST_ROUTER
inherit inherit
ITERABLE [TUPLE [handler: REQUEST_HANDLER; id: READABLE_STRING_8; request_methods: detachable ARRAY [READABLE_STRING_8]]] ITERABLE [TUPLE [handler: REQUEST_HANDLER; resource: READABLE_STRING_8; request_methods: detachable ARRAY [READABLE_STRING_8]]]
feature -- Registration feature -- Registration

View File

@@ -77,7 +77,7 @@ feature {NONE} -- Access: Implementation
l_handlers.after or Result /= Void l_handlers.after or Result /= Void
loop loop
l_item := l_handlers.item l_item := l_handlers.item
if is_matching_request_methods (rqst_method, l_item.request_methods) and a_path.same_string (l_item.uri) then if is_matching_request_methods (rqst_method, l_item.request_methods) and a_path.same_string (l_item.resource) then
Result := l_item.handler Result := l_item.handler
end end
l_handlers.forth l_handlers.forth
@@ -128,7 +128,7 @@ feature -- Context factory
feature -- Access feature -- Access
new_cursor: ITERATION_CURSOR [TUPLE [handler: REQUEST_HANDLER; id: READABLE_STRING_8; request_methods: detachable ARRAY [READABLE_STRING_8]]] new_cursor: ITERATION_CURSOR [TUPLE [handler: REQUEST_HANDLER; resource: READABLE_STRING_8; request_methods: detachable ARRAY [READABLE_STRING_8]]]
-- Fresh cursor associated with current structure -- Fresh cursor associated with current structure
do do
Result := handlers.new_cursor Result := handlers.new_cursor
@@ -136,7 +136,7 @@ feature -- Access
feature {NONE} -- Implementation feature {NONE} -- Implementation
handlers: ARRAYED_LIST [TUPLE [handler: REQUEST_HANDLER; uri: READABLE_STRING_8; request_methods: detachable ARRAY [READABLE_STRING_8]]] handlers: ARRAYED_LIST [TUPLE [handler: REQUEST_HANDLER; resource: READABLE_STRING_8; request_methods: detachable ARRAY [READABLE_STRING_8]]]
-- Handlers indexed by the template expression -- Handlers indexed by the template expression
-- see `templates' -- see `templates'

View File

@@ -63,7 +63,7 @@ feature {NONE} -- Access: Implementation
loop loop
if attached l_handlers.item as l_info then if attached l_handlers.item as l_info then
if is_matching_request_methods (l_req_method, l_info.request_methods) then if is_matching_request_methods (l_req_method, l_info.request_methods) then
t := l_info.template t := l_info.resource
if attached templates.item (t) as tpl and then if attached templates.item (t) as tpl and then
attached tpl.match (p) as res attached tpl.match (p) as res
then then
@@ -89,7 +89,7 @@ feature -- Context factory
feature -- Access: ITERABLE feature -- Access: ITERABLE
new_cursor: ITERATION_CURSOR [TUPLE [handler: REQUEST_HANDLER; template: READABLE_STRING_8; request_methods: detachable ARRAY [READABLE_STRING_8]]] new_cursor: ITERATION_CURSOR [TUPLE [handler: REQUEST_HANDLER; resource: READABLE_STRING_8; request_methods: detachable ARRAY [READABLE_STRING_8]]]
-- Fresh cursor associated with current structure -- Fresh cursor associated with current structure
do do
Result := handlers.new_cursor Result := handlers.new_cursor
@@ -97,7 +97,7 @@ feature -- Access: ITERABLE
feature {NONE} -- Implementation feature {NONE} -- Implementation
handlers: ARRAYED_LIST [TUPLE [handler: REQUEST_HANDLER; template: READABLE_STRING_8; request_methods: detachable ARRAY [READABLE_STRING_8]]] handlers: ARRAYED_LIST [TUPLE [handler: REQUEST_HANDLER; resource: READABLE_STRING_8; request_methods: detachable ARRAY [READABLE_STRING_8]]]
-- Handlers indexed by the template expression -- Handlers indexed by the template expression
-- see `templates' -- see `templates'