Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:tests:languageswitcherfixture

Differences

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

Link to this comparison view

Next revision
Previous revision
scriptlog:tests:languageswitcherfixture [2026/09/26 09:09] – admin adminscriptlog:tests:languageswitcherfixture [2026/09/26 09:34] (current) – admin admin
Line 18: Line 18:
 ======= Properties (1) ======= ======= Properties (1) =======
  
-  ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ +^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
-  | ''private static'' | ''static'' | ''$dbc'' | ''null;'' | 20 |+| ''private static'' | ''static'' | ''$dbc'' | ''null'' | 20 |
  
 ======= Methods (12) ======= ======= Methods (12) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public static | ''initDb()'' | Initialize database connection | 25 | +| public static | ''initDb()'' | Initialize database connection | 25 | 
-  | public static | ''getDb()'' | (undocumented) | 46 | +| public static | ''getDb()'' | (undocumented) | 46 | 
-  | public static | ''isDbAvailable()'' | (undocumented) | 52 | +| public static | ''isDbAvailable()'' | (undocumented) | 52 | 
-  | public static | ''getLanguages()'' | Get languages from database | 61 | +| public static | ''getLanguages()'' | Get languages from database | 61 | 
-  | public static | ''getPostsByLocale()'' | Get posts filtered by locale from the real database | 73 | +| public static | ''getPostsByLocale()'' | Get posts filtered by locale from the real database | 73 | 
-  | public static | ''getTopicsByLocale()'' | Get topics filtered by locale from the real database | 88 | +| public static | ''getTopicsByLocale()'' | Get topics filtered by locale from the real database | 88 | 
-  | public static | ''getMenuItemsByLocale()'' | Get menu items filtered by locale from the real database | 103 | +| public static | ''getMenuItemsByLocale()'' | Get menu items filtered by locale from the real database | 103 | 
-  | public static | ''getAllPublishedPosts()'' | Get all published posts (no locale filter) | 118 | +| public static | ''getAllPublishedPosts()'' | Get all published posts (no locale filter) | 118 | 
-  | public static | ''getLanguageDirectionFromDb()'' | Lookup language direction from real database (same logic as I18nManager::getLan… | 130 | +| public static | ''getLanguageDirectionFromDb()'' | Lookup language direction from real database (same logic as I18nManager::getLan… | 130 | 
-  | public static | ''processSwitchLang()'' | Process switch-lang — replicates lib/main.php lines 103-129 EXACTLY. | 155 | +| public static | ''processSwitchLang()'' | Process switch-lang — replicates lib/main.php lines 103-129 EXACTLY. | 155 | 
-  | public static | ''detectLocale()'' | Detect locale from session/cookie/default | 215 | +| public static | ''detectLocale()'' | Detect locale from session/cookie/default | 215 | 
-  | public static | ''bootstrapI18nManager()'' | Initialize I18nManager for testing real is_rtl() function. | 241 |+| public static | ''bootstrapI18nManager()'' | Initialize I18nManager for testing real is_rtl() function. | 241 |
  
  
Line 104: Line 104:
 Get posts filtered by locale from the real database Get posts filtered by locale from the real database
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$locale'' | ''string'' | //required// | //none// |+|  ''$locale'' |  ''string'' |  //required// |  //none// |
  
 **Returns:** ''array'' **Returns:** ''array''
Line 120: Line 120:
 Get topics filtered by locale from the real database Get topics filtered by locale from the real database
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$locale'' | ''string'' | //required// | //none// |+|  ''$locale'' |  ''string'' |  //required// |  //none// |
  
 **Returns:** ''array'' **Returns:** ''array''
Line 136: Line 136:
 Get menu items filtered by locale from the real database Get menu items filtered by locale from the real database
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$locale'' | ''string'' | //required// | //none// |+|  ''$locale'' |  ''string'' |  //required// |  //none// |
  
 **Returns:** ''array'' **Returns:** ''array''
Line 167: Line 167:
 Lookup language direction from real database (same logic as I18nManager::getLanguageDirection) Lookup language direction from real database (same logic as I18nManager::getLanguageDirection)
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$locale'' | ''string'' | //required// | //none// |+|  ''$locale'' |  ''string'' |  //required// |  //none// |
  
 **Returns:** ''string'' **Returns:** ''string''
Line 188: Line 188:
 \- Returns result struct instead of exit() \- Returns result struct instead of exit()
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$session (by reference)'' | ''array'' | //required// | //none// | +|  ''$session (by reference)'' |  ''array'' |  //required// |  //none// | 
-  | ''$get'' | ''array'' | //required// | //none// |+|  ''$get'' |  ''array'' |  //required// |  //none// |
  
 **Returns:** ''array'' **Returns:** ''array''
Line 207: Line 207:
 Same logic as the real LocaleDetector + config default Same logic as the real LocaleDetector + config default
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$session'' | ''array'' | //required// | //none// | +|  ''$session'' |  ''array'' |  //required// |  //none// | 
-  | ''$cookie'' | ''array'' | //required// | //none// |+|  ''$cookie'' |  ''array'' |  //required// |  //none// |
  
 **Returns:** ''string'' **Returns:** ''string''
Line 232: Line 232:
 ======= Conditional Includes ======= ======= Conditional Includes =======
  
-  ^ Mode ^ Target ^ Line ^ +^ Mode ^ Target ^ Line ^ 
-  | ''require'' | ''require_once __DIR__ . '/../../public/themes/blog/functions.php';'' | 15 |+| ''require'' | ''require_once __DIR__ . '/../../public/themes/blog/functions.php';'' | 15 |
  
  
scriptlog/tests/languageswitcherfixture.1790413765.txt.gz · Last modified: by admin