Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:core:requestpath

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:core:requestpath [2026/09/26 09:09] – admin adminscriptlog:lib:core:requestpath [2026/09/26 09:34] (current) – admin admin
Line 16: Line 16:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Core Class | +| ''@category'' | Core Class | 
-  | ''@license'' | MIT | +| ''@license'' | MIT | 
-  | ''@version'' | 1.1 | +| ''@version'' | 1.1 | 
-  | ''@since'' | Since Release 1.0 |+| ''@since'' | Since Release 1.0 |
  
 ======= Inheritance ======= ======= Inheritance =======
Line 28: Line 28:
 ======= Constants (1) ======= ======= Constants (1) =======
  
-  ^ Visibility ^ Name ^ Value ^ Line ^ +^ Visibility ^ Name ^ Value ^ Line ^ 
-  | ''private'' | ''MAX_PARAMS'' | ''4;'' | 31 |+| ''private'' | ''MAX_PARAMS'' | ''4;'' | 31 |
  
-======= Properties (0) =======+======= Properties (1) =======
  
-//None declared.//+^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
 +| ''private'' | ''array'' | ''$parts'' | ''[]'' | 30 |
  
 ======= Methods (12) ======= ======= Methods (12) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | (undocumented) | 33 | +| public | ''__construct()'' | (undocumented) | 33 | 
-  | private | ''getSanitizedPath()'' | Get and sanitize the request path | 43 | +| private | ''getSanitizedPath()'' | Get and sanitize the request path | 43 | 
-  | private | ''splitPath()'' | Split path into components | 60 | +| private | ''splitPath()'' | Split path into components | 60 | 
-  | private | ''sanitizePath()'' | Sanitize path components | 69 | +| private | ''sanitizePath()'' | Sanitize path components | 69 | 
-  | private | ''parsePathBits()'' | Parse path segments into named and sequential parameters | 83 | +| private | ''parsePathBits()'' | Parse path segments into named and sequential parameters | 83 | 
-  | private | ''parseKeyValuePairs()'' | Parse remaining segments as key-value pairs | 118 | +| private | ''parseKeyValuePairs()'' | Parse remaining segments as key-value pairs | 118 | 
-  | private | ''sanitizeValue()'' | Sanitize individual values | 138 | +| private | ''sanitizeValue()'' | Sanitize individual values | 138 | 
-  | public | ''setParameters()'' | Sets extracted named route parameters. | 150 | +| public | ''setParameters()'' | Sets extracted named route parameters. | 150 | 
-  | public | ''__get()'' | Magic getter with null coalescing | 165 | +| public | ''__get()'' | Magic getter with null coalescing | 165 | 
-  | public | ''__set()'' | Magic setter with sanitization | 173 | +| public | ''__set()'' | Magic setter with sanitization | 173 | 
-  | public | ''__isset()'' | Check if parameter exists | 181 | +| public | ''__isset()'' | Check if parameter exists | 181 | 
-  | public | ''getAll()'' | Get all parameters | 189 |+| public | ''getAll()'' | Get all parameters | 189 |
  
  
Line 88: Line 89:
 Split path into components Split path into components
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$path'' | ''string'' | //required// | //none// |+|  ''$path'' |  ''string'' |  //required// |  //none// |
  
 **Returns:** ''array'' **Returns:** ''array''
Line 104: Line 105:
 Sanitize path components Sanitize path components
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$path'' | ''string'' | //required// | //none// |+|  ''$path'' |  ''string'' |  //required// |  //none// |
  
 **Returns:** ''string'' **Returns:** ''string''
Line 120: Line 121:
 Parse path segments into named and sequential parameters Parse path segments into named and sequential parameters
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$bits'' | ''array'' | //required// | //none// |+|  ''$bits'' |  ''array'' |  //required// |  //none// |
  
 **Returns:** ''array'' **Returns:** ''array''
Line 136: Line 137:
 Parse remaining segments as key-value pairs Parse remaining segments as key-value pairs
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$bits'' | ''array'' | //required// | //none// | +|  ''$bits'' |  ''array'' |  //required// |  //none// | 
-  | ''$parsed (by reference)'' | ''array'' | //required// | //none// |+|  ''$parsed (by reference)'' |  ''array'' |  //required// |  //none// |
  
 **Returns:** ''void'' **Returns:** ''void''
Line 153: Line 154:
 Sanitize individual values Sanitize individual values
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$value'' | ''string'' | //required// | //none// |+|  ''$value'' |  ''string'' |  //required// |  //none// |
  
 **Returns:** ''string'' **Returns:** ''string''
Line 172: Line 173:
 \* @param array $params The array of matches from Dispatcher's preg_match. \* @param array $params The array of matches from Dispatcher's preg_match.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''array'' | //required// | //none// |+|  ''$params'' |  ''array'' |  //required// |  //none// |
  
 **Returns:** ''void'' **Returns:** ''void''
Line 188: Line 189:
 Magic getter with null coalescing Magic getter with null coalescing
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$key'' | ''string'' | //required// | //none// |+|  ''$key'' |  ''string'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 204: Line 205:
 Magic setter with sanitization Magic setter with sanitization
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$key'' | ''string'' | //required// | //none// | +|  ''$key'' |  ''string'' |  //required// |  //none// | 
-  | ''$value'' | ''(untyped)'' | //required// | //none// |+|  ''$value'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''void'' **Returns:** ''void''
Line 221: Line 222:
 Check if parameter exists Check if parameter exists
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$key'' | ''string'' | //required// | //none// |+|  ''$key'' |  ''string'' |  //required// |  //none// |
  
 **Returns:** ''bool'' **Returns:** ''bool''
scriptlog/lib/core/requestpath.1790413762.txt.gz · Last modified: by admin