Lwt
Table of Contents
Packages
Interfaces
- ApiRoutableInterface
- Interface for API handlers that participate in route dispatch.
Classes
- Endpoints
- Registry of API V1 endpoints.
- Response
- Standardized JSON response helper for API V1.
- Application
- Main application class that bootstraps and runs LWT.
- ApiController
- Controller for REST API endpoints.
- CreateUser
- DeleteUser
- ListUsers
- ToggleUserRole
- ToggleUserStatus
- UpdateUser
- UserManagementController
- Abstract base controller providing common functionality for all controllers.
- GoogleTranslateClient
- Wrapper class to get translation.
- FeedEditController
- Controller for feed CRUD operations.
- FeedIndexController
- Controller for feed index/browse operations.
- FeedLoadController
- Controller for feed loading/importing operations.
- LanguageController
- Controller for language configuration.
- WhisperClient
- HTTP client for communicating with the NLP microservice Whisper endpoints.
- FrequencyImportService
- Fetches word frequency lists from the FrequencyWords project and bulk-imports them as starter vocabulary for a language.
- FrequencyLanguageMap
- Maps LWT language names to external frequency/dictionary source codes.
- LemmatizerFactory
- Factory for creating lemmatizers based on language configuration.
- WiktionaryEnrichmentService
- Enriches imported vocabulary with translations from kaikki.org (Wiktextract structured data) or monolingual definitions from Wiktionary APIs.
- StarterVocabController
- Controller for the starter vocabulary import flow.
- HybridLemmatizer
- Hybrid lemmatizer that combines dictionary and NLP-based approaches.
- NlpServiceLemmatizer
- Lemmatizer that uses the NLP microservice (spaCy).
- EnvLoader
- Simple .env file parser and loader.
- Configuration
- Database configuration and connection utilities.
- Connection
- Database connection wrapper providing a clean interface for database operations.
- DB
- Database facade providing a simplified interface for common operations.
- Escaping
- SQL escaping and text preparation utilities.
- Maintenance
- Database maintenance and optimization utilities.
- Migrations
- Database migrations and initialization utilities.
- PreparedStatement
- Wrapper class for mysqli prepared statements.
- QueryBuilder
- Fluent query builder for constructing SQL queries.
- Settings
- Application settings management.
- SqlFileParser
- SQL file parser for reading and splitting SQL files into individual queries.
- TextParsing
- Text parsing and processing utilities.
- Validation
- Database ID and tag validation utilities.
- InputValidator
- Centralized input validation for request parameters.
- UrlUtilities
- URL handling utilities.
- ErrorHandler
- Error handling utilities.
- StringUtils
- String manipulation utilities.
- ViteHelper
- Helper class for Vite asset loading.
- FormHelper
- Helper class for generating HTML form attributes.
- IconHelper
- Helper class for rendering Lucide SVG icons.
- PageLayoutHelper
- Helper class for generating page layout elements.
- SearchableSelectHelper
- Helper class for rendering searchable select components.
- SelectOptionsBuilder
- Builder class for generating HTML select options.
- TagHelper
- Helper class for rendering tags with Bulma styling.
Traits
- FeedFlashTrait
- Shared flash message rendering for Feed controllers.
- ApiRoutableTrait
- Default implementations for ApiRoutableInterface methods.
Functions
- url() : string
- Generate a URL with the application base path prepended.
- base_path() : string
- Get the configured application base path.
Functions
url()
Generate a URL with the application base path prepended.
url([string $path = '/' ]) : string
Use this for all internal links to ensure they work correctly when the application is installed in a subdirectory.
Parameters
- $path : string = '/'
-
The path to generate URL for (should start with /)
Tags
Return values
string —The full URL path with base path prepended
base_path()
Get the configured application base path.
base_path() : string
Return values
string —The base path (e.g., '/lwt') or empty string for root