Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:core:dispatcher

Differences

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

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:core:dispatcher [2026/09/26 09:09] – admin adminscriptlog:lib:core:dispatcher [2026/09/26 09:34] (current) – admin admin
Line 10: Line 10:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Core Class | +| ''@category'' | Core Class | 
-  | ''@author'' | M.Noermoehammad | +| ''@author'' | M.Noermoehammad | 
-  | ''@license'' | MIT | +| ''@license'' | MIT | 
-  | ''@version'' | 1.1.2 | +| ''@version'' | 1.1.2 | 
-  | ''@since'' | Since Release 0.1 | +| ''@since'' | Since Release 0.1 | 
-  | ''@see'' | https://stackoverflow.com/questions/11696718/htaccess-rewrite-book-phpid-1234-to-book-1234 | +| ''@see'' | https://stackoverflow.com/questions/11696718/htaccess-rewrite-book-phpid-1234-to-book-1234 | 
-  | ''@see'' | https://stackoverflow.com/questions/1039725/how-to-do-url-re-writing-in-php | +| ''@see'' | https://stackoverflow.com/questions/1039725/how-to-do-url-re-writing-in-php | 
-  | ''@see'' | https://stackoverflow.com/questions/60339372/how-to-rewrite-url-by-htaccess-with-basic-parameters-in-core-php | +| ''@see'' | https://stackoverflow.com/questions/60339372/how-to-rewrite-url-by-htaccess-with-basic-parameters-in-core-php | 
-  | ''@see'' | https://httpd.apache.org/docs/trunk/mod/mod_dir.html#fallbackresource | +| ''@see'' | https://httpd.apache.org/docs/trunk/mod/mod_dir.html#fallbackresource | 
-  | ''@see'' | https://stackoverflow.com/questions/26419426/htaccess-url-re-styling-image-url-to-seo-friendly | +| ''@see'' | https://stackoverflow.com/questions/26419426/htaccess-url-re-styling-image-url-to-seo-friendly | 
-  | ''@see'' | https://mediatemple.net/community/products/dv/204643270/using-htaccess-rewrite-rules | +| ''@see'' | https://mediatemple.net/community/products/dv/204643270/using-htaccess-rewrite-rules | 
-  | ''@see'' | https://stackoverflow.com/questions/16388959/url-rewriting-with-php |+| ''@see'' | https://stackoverflow.com/questions/16388959/url-rewriting-with-php |
  
 ======= Inheritance ======= ======= Inheritance =======
Line 32: Line 32:
 //None.// //None.//
  
-======= Properties (2) =======+======= Properties (4) =======
  
-  ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ +^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
-  | ''private'' | ''(untyped)'' | ''$route'' | ''[];'' | 42 | +| ''private'' | ''(untyped)'' | ''$route'' | ''[]'' | 42 | 
-  | ''private'' | ''(untyped)'' | ''$frontendCompiled'' | ''null;'' | 47 |+| ''private'' | ''(untyped)'' | ''$frontendCompiled'' | ''null'' | 47 | 
 +| ''private'' | ''(untyped)'' | ''$theme_dir'' |  | 55 | 
 +| ''private'' | [[scriptlog:lib:core:themerendererinterface|''?ThemeRendererInterface'']] | ''$themeRenderer'' | ''null'' | 62 |
  
 ======= Methods (19) ======= ======= Methods (19) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | Constructor | 68 | +| public | ''__construct()'' | Constructor | 68 | 
-  | public | ''dispatch()'' | dispatch | 84 | +| public | ''dispatch()'' | dispatch | 84 | 
-  | public | ''handleSeoFriendlyUrl()'' | handleSeoFriendlyUrl | 98 | +| public | ''handleSeoFriendlyUrl()'' | handleSeoFriendlyUrl | 98 | 
-  | private | ''validateContentExists()'' | Validate content exists in database | 204 | +| private | ''validateContentExists()'' | Validate content exists in database | 204 | 
-  | private | ''validateSinglePost()'' | (undocumented) | 228 | +| private | ''validateSinglePost()'' | (undocumented) | 228 | 
-  | private | ''validatePage()'' | (undocumented) | 248 | +| private | ''validatePage()'' | (undocumented) | 248 | 
-  | private | ''validateCategory()'' | (undocumented) | 267 | +| private | ''validateCategory()'' | (undocumented) | 267 | 
-  | private | ''validateArchive()'' | (undocumented) | 278 | +| private | ''validateArchive()'' | (undocumented) | 278 | 
-  | private | ''validateTag()'' | (undocumented) | 297 | +| private | ''validateTag()'' | (undocumented) | 297 | 
-  | private | ''handleQueryDownload()'' | (undocumented) | 308 | +| private | ''handleQueryDownload()'' | (undocumented) | 308 | 
-  | private | ''handleQueryStringUrl()'' | handleQueryStringUrl | 336 | +| private | ''handleQueryStringUrl()'' | handleQueryStringUrl | 336 | 
-  | private | ''requestURI()'' | RequestURI() | 349 | +| private | ''requestURI()'' | RequestURI() | 349 | 
-  | private | ''invokeTheme()'' | (undocumented) | 375 | +| private | ''invokeTheme()'' | (undocumented) | 375 | 
-  | private | ''renderTheme()'' | renderTheme | 386 | +| private | ''renderTheme()'' | renderTheme | 386 | 
-  | private | ''renderHtmxFragment()'' | Render HTMX fragment — just the content template, no header/footer. | 408 | +| private | ''renderHtmxFragment()'' | Render HTMX fragment — just the content template, no header/footer. | 408 | 
-  | private | ''compileFrontendRoutes()'' | Compile all frontend routes into a combined (?|...) branch-reset regex. | 433 | +| private | ''compileFrontendRoutes()'' | Compile all frontend routes into a combined (?|...) branch-reset regex. | 433 | 
-  | private | ''renderDownloadFile()'' | renderDownloadFile | 477 | +| private | ''renderDownloadFile()'' | renderDownloadFile | 477 | 
-  | private | ''errorNotFound()'' | (undocumented) | 494 | +| private | ''errorNotFound()'' | (undocumented) | 494 | 
-  | private | ''whiteListPathRequested()'' | Get whitelisted paths | 509 |+| private | ''whiteListPathRequested()'' | Get whitelisted paths | 509 |
  
  
Line 74: Line 76:
 Registry route and Initialize an instantiate of theme Registry route and Initialize an instantiate of theme
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$themeRenderer'' | [[scriptlog:lib:core:themerendererinterface|''?ThemeRendererInterface'']] | ''null'' | //none// |+|  ''$themeRenderer'' |  [[scriptlog:lib:core:themerendererinterface|''?ThemeRendererInterface'']] |  ''null'' |  //none// |
  
  
Line 116: Line 118:
 Validate content exists in database Validate content exists in database
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$routeKey'' | ''(untyped)'' | //required// | //none// | +|  ''$routeKey'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$requestPath'' | ''(untyped)'' | //required// | //none// |+|  ''$requestPath'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — bool **Returns:** ''(none declared)'' — bool
Line 131: Line 133:
 //lines 228–246 (19)// //lines 228–246 (19)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$requestPath'' | ''(untyped)'' | //required// | //none// |+|  ''$requestPath'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 145: Line 147:
 //lines 248–265 (18)// //lines 248–265 (18)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$requestPath'' | ''(untyped)'' | //required// | //none// |+|  ''$requestPath'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 159: Line 161:
 //lines 267–276 (10)// //lines 267–276 (10)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$requestPath'' | ''(untyped)'' | //required// | //none// |+|  ''$requestPath'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 173: Line 175:
 //lines 278–295 (18)// //lines 278–295 (18)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$requestPath'' | ''(untyped)'' | //required// | //none// |+|  ''$requestPath'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 187: Line 189:
 //lines 297–306 (10)// //lines 297–306 (10)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$requestPath'' | ''(untyped)'' | //required// | //none// |+|  ''$requestPath'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 259: Line 261:
 renderTheme renderTheme
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$template'' | ''(untyped)'' | //required// | //none// |+|  ''$template'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 275: Line 277:
 Render HTMX fragment — just the content template, no header/footer. Render HTMX fragment — just the content template, no header/footer.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$template'' | ''(untyped)'' | //required// | //none// |+|  ''$template'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 312: Line 314:
 Handles actual file download - bypasses theme headers/footers Handles actual file download - bypasses theme headers/footers
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$_requestPath'' | ''(untyped)'' | //required// | //none// |+|  ''$_requestPath'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 347: Line 349:
 ======= Imports ======= ======= Imports =======
  
-  ^ Alias ^ Fully-qualified name ^ +^ Alias ^ Fully-qualified name ^ 
-  | ''DownloadController'' | [[scriptlog:lib:controller:downloadcontroller|''Scriptlog\Controller\DownloadController'']] | +| ''DownloadController'' | [[scriptlog:lib:controller:downloadcontroller|''Scriptlog\Controller\DownloadController'']] | 
-  | ''LocaleController'' | [[scriptlog:lib:controller:localecontroller|''Scriptlog\Controller\LocaleController'']] | +| ''LocaleController'' | [[scriptlog:lib:controller:localecontroller|''Scriptlog\Controller\LocaleController'']] | 
-  | ''SearchController'' | [[scriptlog:lib:controller:searchcontroller|''Scriptlog\Controller\SearchController'']] | +| ''SearchController'' | [[scriptlog:lib:controller:searchcontroller|''Scriptlog\Controller\SearchController'']] | 
-  | ''MediaDao'' | [[scriptlog:lib:dao:mediadao|''Scriptlog\Dao\MediaDao'']] | +| ''MediaDao'' | [[scriptlog:lib:dao:mediadao|''Scriptlog\Dao\MediaDao'']] | 
-  | ''DownloadModel'' | [[scriptlog:lib:model:downloadmodel|''Scriptlog\Model\DownloadModel'']] | +| ''DownloadModel'' | [[scriptlog:lib:model:downloadmodel|''Scriptlog\Model\DownloadModel'']] | 
-  | ''DownloadService'' | [[scriptlog:lib:service:downloadservice|''Scriptlog\Service\DownloadService'']] |+| ''DownloadService'' | [[scriptlog:lib:service:downloadservice|''Scriptlog\Service\DownloadService'']] |
  
  
scriptlog/lib/core/dispatcher.1790413761.txt.gz · Last modified: by admin