Daraja HTTP Framework 3.0
HTTP server framework for Object Pascal
|
Holds all known web component mappings for a context. More...
Public Member Functions | |
TSpecType | GetSpecType (const string Spec) |
Boolean | Matches (const string Path, const string Spec) |
CheckExists (const string UrlPattern) | |
Check if a mapping path exists. | |
AddUrlPattern (const string UrlPattern, TObject Value) | |
Add a web component mapping. | |
TStrings | GetMatches (const string Path) |
Return all matching mappings for the given path. | |
Protected Member Functions | |
Boolean | Matches (const string Path, const string Spec, TSpecType SpecType) |
Holds all known web component mappings for a context.
Matching is performed in the following order Exact match Longest prefix match Longest suffix match
TdjPathMap::AddUrlPattern | ( | const string | UrlPattern, |
TObject | Value ) |
Add a web component mapping.
UrlPattern | a single component mapping path (for example, '.html' or '/') |
Value | the mapped web component |
EWebComponentException |
References CheckExists().
TdjPathMap::CheckExists | ( | const string | UrlPattern | ) |
Check if a mapping path exists.
This procedure throws a EWebComponentException if the URL pattern is already registered for this context.
UrlPattern | a single component mapping path (for example, '.html' or '/') |
EWebComponentException |
Referenced by AddUrlPattern().
TStrings TdjPathMap::GetMatches | ( | const string | Path | ) |
Return all matching mappings for the given path.
The best match will be the first entry.
Path | the URL path (without context), for example 'test.html' |
class TSpecType TdjPathMap::GetSpecType | ( | const string | Spec | ) |
Spec | the path specification (for example, '/*') |
|
protected |
Path | the URL document path |
Spec | the path specification (for example, '/*') |
SpecType | the path specification type |