| 1 | <?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 | <configurations xmlns="http://agavi.org/agavi/1.0/config" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:yay="http://agavi.org/sampleapp" targetNamespace="http://agavi.org/sampleapp"> |
|---|
| 3 | |
|---|
| 4 | <configuration context="web"> |
|---|
| 5 | <routes> |
|---|
| 6 | <!-- matches "/de" or "/en" at the beginning of the URL and uses either value to set the locale, with British Pounds Sterling as the currency. Execution will not stop if this route matches. If it matches, the matched fragment will be stripped from the input URL for the following routes. This route has the "imply" flag, which means that it will be included in generated routes even if the gen() call does not explicitly mention it. The matched "language" parameter will not be available as a request parameter in the code, because it's "ignore"d --> |
|---|
| 7 | <route pattern="^/({locale:[a-z]{2}(_[A-Z]{2})?})" stop="false" imply="true" cut="true" locale="${locale}@currency=GBP" callback="AgaviSampleAppLanguageRoutingCallback"> |
|---|
| 8 | <ignores> |
|---|
| 9 | <ignore>locale</ignore> |
|---|
| 10 | </ignores> |
|---|
| 11 | </route> |
|---|
| 12 | |
|---|
| 13 | <!-- If the HTTP Accept: header contains "application/json" (i.e. if you do an XMLHTTPRequest with one of the usual JS frameworks), set the output type to "json". Look at output_types.xml for the declaration of that output type. Execution will not stop if this route matches. This is nice for making XMLHTTPRequest calls. --> |
|---|
| 14 | <route pattern="application/json" source="_SERVER[HTTP_ACCEPT]" output_type="json" stop="false" /> |
|---|
| 15 | |
|---|
| 16 | <route name="disabled" pattern="^/disabled" module="Disabled" action="Index" /> |
|---|
| 17 | |
|---|
| 18 | <route name="login" pattern="^/login" module="%actions.login_module%" action="%actions.login_action%"> |
|---|
| 19 | <routes> |
|---|
| 20 | <!-- A nested route. This will match the URL "/login/logout" - matched fragments from the parent route are stripped from the URL string for child routs. --> |
|---|
| 21 | <route name="logout" pattern="^/logout" module="%actions.login_module%" action="Logout" /> |
|---|
| 22 | </routes> |
|---|
| 23 | </route> |
|---|
| 24 | <route name="secure2" pattern="^/secure2" module="Default" action="Secure2" /> |
|---|
| 25 | <route name="secure" pattern="^/secure" module="Default" action="Secure1" /> |
|---|
| 26 | |
|---|
| 27 | <!-- This route uses a prefix and a postfix for a value, and the entire block is optional. That means that you can omit "buy-cheap-whatever-at-agavi-dot-org" from the URL, and the route still matches! If there is no value given for the parameter "name" when you enerate a route, the entire block will be missing. Since we specified a default value here, you have to explicitly set that parameter to 'null' when generating, so it gets skipped. --> |
|---|
| 28 | <route name="search_engine_spam" pattern="^/products(/buy-cheap-{name:[\S\s]+}-at-agavi-dot-org)?/(id:\d+)" module="Default" action="SearchEngineSpam"> |
|---|
| 29 | <defaults> |
|---|
| 30 | <default for="name">/buy-cheap-{}-at-agavi-dot-org</default> |
|---|
| 31 | </defaults> |
|---|
| 32 | </route> |
|---|
| 33 | |
|---|
| 34 | <!-- The last route in case the input URL is just "/". --> |
|---|
| 35 | <route name="index" pattern="^/$" module="%actions.default_module%" action="%actions.default_action%" /> |
|---|
| 36 | |
|---|
| 37 | <!-- If no route matched here, the 404 action will be used. You could change that behavior by setting the last route above to use an empty pattern. --> |
|---|
| 38 | </routes> |
|---|
| 39 | </configuration> |
|---|
| 40 | |
|---|
| 41 | <configuration context="soap"> |
|---|
| 42 | <routes> |
|---|
| 43 | <!-- SOAP calls include the name of a remote method to call. The WebserviceRouting applies patterns to this method name, not to the URL of the request. We set the request method to "read" here so executeRead() is run in the Action. --> |
|---|
| 44 | <route pattern="^getItemPrice$" module="Default" action="SearchEngineSpam" method="read"> |
|---|
| 45 | <wsdl:input> |
|---|
| 46 | <wsdl:part name="id" type="xsd:int" /> |
|---|
| 47 | </wsdl:input> |
|---|
| 48 | <wsdl:output> |
|---|
| 49 | <wsdl:part name="price" type="xsd:float" /> |
|---|
| 50 | </wsdl:output> |
|---|
| 51 | </route> |
|---|
| 52 | </routes> |
|---|
| 53 | </configuration> |
|---|
| 54 | |
|---|
| 55 | <configuration context="wsdl"> |
|---|
| 56 | <routes> |
|---|
| 57 | <route pattern="(dummy:.*)" module="Default" action="SendWsdl" /> |
|---|
| 58 | </routes> |
|---|
| 59 | </configuration> |
|---|
| 60 | |
|---|
| 61 | <configuration context="xmlrpc"> |
|---|
| 62 | <routes> |
|---|
| 63 | <!-- XMLRPC calls include the name of a remote method to call. The WebserviceRouting applies patterns to this method name, not to the URL of the request. We set the request method to "read" here so executeRead() is run in the Action. --> |
|---|
| 64 | <route pattern="^getItemPrice$" module="Default" action="SearchEngineSpam" method="read" /> |
|---|
| 65 | </routes> |
|---|
| 66 | </configuration> |
|---|
| 67 | </configurations> |
|---|