added URI_TEMPLATE_MATCH_RESULT
This commit is contained in:
@@ -3,7 +3,7 @@ note
|
||||
Summary description for {URI_TEMPLATE}.
|
||||
|
||||
See http://tools.ietf.org/html/draft-gregorio-uritemplate-05
|
||||
|
||||
|
||||
]"
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
@@ -116,7 +116,7 @@ feature -- Builder
|
||||
|
||||
feature -- Analyze
|
||||
|
||||
match (a_uri: STRING): detachable TUPLE [path_variables: HASH_TABLE [STRING, STRING]; query_variables: HASH_TABLE [STRING, STRING]]
|
||||
match (a_uri: STRING): detachable URI_TEMPLATE_MATCH_RESULT
|
||||
local
|
||||
b: BOOLEAN
|
||||
tpl: like template
|
||||
@@ -174,7 +174,7 @@ feature -- Analyze
|
||||
l_x_parts.forth
|
||||
end
|
||||
if b then
|
||||
Result := [l_path_vars, l_query_vars]
|
||||
create Result.make (l_path_vars, l_query_vars)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
note
|
||||
description: "Summary description for {URI_TEMPLATE_MATCH_RESULT}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
URI_TEMPLATE_MATCH_RESULT
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (p: like path_variables; q: like query_variables)
|
||||
do
|
||||
path_variables := p
|
||||
query_variables := q
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
path_variables: HASH_TABLE [STRING, STRING]
|
||||
query_variables: HASH_TABLE [STRING, STRING]
|
||||
|
||||
;note
|
||||
copyright: "2011-2011, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
5949 Hollister Ave., Goleta, CA 93117 USA
|
||||
Telephone 805-685-1006, Fax 805-685-6869
|
||||
Website http://www.eiffel.com
|
||||
Customer support http://support.eiffel.com
|
||||
]"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user