-
Notifications
You must be signed in to change notification settings - Fork 1
Endpoint API
mattbasta edited this page Sep 17, 2011
·
8 revisions
There are a number of variables and constants exposed by Interchange.
| Constant | Description | Values |
|---|---|---|
| DOMAIN | The domain of the requested URL | \w |
| EXTENSION | The file extension of FILENAME, if present | \w+ |
| FILE | The normalized version of REQUESTED_FILE | |
| FILENAME | The final segment of the REQUESTE_FILE constant | \w+ |
| FULL_PATH | FILE, but without FILENAME | |
| IXG_PATH_PREFIX | The path of the Interchange root directory | |
| METHODICAL | Defined and true if the current endpoint is of type “methods” |
|
| PATH_PREFIX | The path of the current app endpoint | |
| PROTOCOL | The protocol of the request | https? |
| REQUESTED_FILE | The path of the URL; Everything after the domain and port. | (\w+\\)+ |
| URL | The full, recompiled URL that was requested |
Note that PATH_PREFIX is INCREDIBLY (!) useful for getting existing apps to work with Interchange. See Porting Existing Apps for more.
| Variable | Description |
|---|---|
| $keyval | An object that stores global key-value pairs. Consult Using the Key-Value Pair store. |
| $path | An array containing the individual path segments of the URL |
| $session | An object used to manage the session Consult Using the Session Manager Object. |
Note that in order to use these in methodical endpoints, they must be obtained using the global construct.
| Class | Description |
|---|---|
| view_manager | The view management class; used for creating and rendering classes |
| pipe | Data piping class; used for transforming and filtering data |