Luminova Framework

PHP Luminova: Framework Components and API Reference

Last updated: 2025-04-26 06:56:26

Throttler class offers a simple and efficient way to control request frequency, helping you prevent abuse and regulate access across your application.

Welcome to the Luminova Components and API Reference, a detailed guide to the classes, functions, variables, and constants within the Luminova core libraries and modules.


Core Components

Autoload

  • General Bootstrap: Initializes the framework with essential environment setup and core autoloaders for all application contexts.
  • HTTP Bootstrap: Entry point for handling web (HTTP) requests and initializing HTTP-specific services.
  • CLI Bootstrap: Initializes the framework for command-line interface (CLI) usage, loading only CLI-relevant components.
  • Modules Factory: Use factories to manage module creation and dependencies in a modular application architecture.
  • Custom Modules Service: Define and manage custom services within the application, facilitating easy module integration.

Core Application

Configuration

Variables, Global Functions and Constants

Routing

Controllers

Templating

  • View Rendering: Manage rendering of view files and passing of data to templates.
  • Response Handling: Encapsulate view output, content types, and status codes in response objects.
  • Core PHP Template: Use native PHP for layout rendering with basic inheritance and sectioning.
  • Smarty Template: Integrate and use the Smarty templating engine for layout features.
  • Twig Template: Render templates using the Twig engine with logic separation.
  • Template Examples: Examples showcasing how to structure and render views with different engines.

Data Management

Database

Caching

  • Filesystem Cache: Store cache data on disk for persistence across requests.
  • Memory Cache: Use in-memory storage (e.g., Memcached) for fast, volatile caching.
  • PSR Cache Pool: PSR-6 compatible cache pool for flexible and interoperable caching.
  • PSR Simple Cache: PSR-16 simple cache interface for lightweight, standardized caching.
  • Static View Content: Cache rendered views and content fragments to reduce rendering time.
  • Cache Examples: Example scenarios for using different caching strategies effectively.

Storage and Filesystem Management

  • Cloud Storages: Manage cloud-based storage providers like S3 and Azure Blob.
  • File Management Helpers: Utilities for handling files, paths, permissions, and metadata.
  • Private File Delivery: Secure delivery of private or protected files using File Delivery Manager (FDM).
  • File Uploader: Handle secure and efficient file uploads with validation and destination rules.
  • PSR Data Stream: Stream data using PSR-7/PSR-17 compliant interfaces for file and network IO.

Web & HTTP

Incoming HTTP Requests

  • Incoming Request: Handles and parses incoming HTTP request data including methods, inputs, and URI.
  • File Upload Object: Encapsulates uploaded files, including validation, size, and MIME type handling.
  • Request Headers: Access and manage HTTP headers sent with client requests.
  • Request User-Agent: Extract and analyze the client's browser or device user-agent string.
  • Server Properties: Read server-level information like host, port, protocol, and environment.
  • HTTP Status Codes: Reference for standard HTTP status codes used across requests and responses.
  • PSR URIInterface Class: PSR-7 compliant URI class for parsing and manipulating request URIs.

Outgoing Network Request

Cookies and Sessions

Security and Encryption

  • CSRF Protection: Prevent cross-site request forgery attacks by generating and validating CSRF tokens.
  • TOTP Authenticator: Time-based One-Time Password (TOTP) system for two-factor authentication.
  • TOTP Google Client: Google authenticator client integration for verifying and submitting TOTP codes.
  • Input Validation (Rule-Based): Rule-based system for validating incoming data with custom rules.
  • JWT Authentication: Secure user authentication using JSON Web Tokens with expiration and claim support.
  • Rate Limiter: Throttle incoming requests to protect endpoints from abuse and overload.
  • Security Examples: Code examples demonstrating various security features and use cases.
  • Crypter Integration: Simple encryption/decryption layer for strings and sensitive data.
  • Encryption Drivers: Driver-based encryption using OpenSSL, Sodium, or custom implementations.
  • Encryption Examples: Sample usage of cryptographic functions for secure data handling.

Languages

SEO Optimization

  • Schema Object Integration: Enhance webpage SEO with structured data using schema.org vocabulary.
  • Sitemap Generator: Automatically generate XML sitemaps to improve site indexing and discoverability.
  • SEO Examples: Sample implementations for structured data, meta tags, and sitemaps.

Utilities & Helpers

Utility Classes

  • Event Emitter: Manage and dispatch custom events with observers for asynchronous or synchronous operations.
  • Async & Task Queue: Handle asynchronous tasks in a queued system for better flow control and prioritization.
  • Fiber Async & Await: Leverage PHP fibers for async programming with await and async feature.
  • Promise Object: Work with promises for deferred execution and handling asynchronous results.
  • Pipeline Chain Execution: Chain a series of operations or tasks into a single flow for cleaner code.
  • Async Timeout Intervals: Schedule and manage timed asynchronous operations with delay and interval handling.
  • Command Process Executor: Execute and manage system commands or processes.
  • Array Util: Helper functions for common array operations like filtering, mapping, and merging.
  • Lazy Load Object: Implement lazy-loaded objects that only initialize when accessed, improving performance.
  • String Listify: Manipulating strings for searching, storing or converting to array.
  • IP Address: Utilities for handling IP addresses, including validation and conversion.
  • Basic Math: Simple mathematical functions such as addition, subtraction, and rounding.
  • Basic Helper Methods: A collection of basic utility functions for common operations.
  • Input Escaper: Safely escape user inputs to prevent injection attacks and ensure proper encoding.
  • SMTP & Email Template: Handle SMTP connections and email template rendering for sending emails.
  • OpenAI Model Integration: Integrate OpenAI's models for natural language processing tasks.
  • AI Model Helper: Utilities to facilitate the integration and usage of custom AI models.

Date and Time

  • Date & Time Immutable: Immutable date and time object with full support for time zone manipulation and formatting.
  • Time-Based Tasks: Utilities for checking time-based tasks (e,g, isOpen(data-time), expired(...)) etc.

HTML and XHTML Builder

Logging

  • Static Logger Class: A logging class that offers static methods for writing logs to various destination, including telegram and email.
  • Aware Logger: A logger that integrates with different parts of the system, capturing detailed information about context and behavior.
  • NovaLogger Class: A specialized logger class designed to provide advanced features such as backup, performance login and more.
  • Log Levels: Defines the different levels of logging.

Tasks

Notifications


Architecture & Interfaces

HMVC

  • HMVC Design Pattern: Understand the Hierarchical Model-View-Controller (HMVC) design pattern for building modular and scalable applications.

Interface and Exception Classes

  • Interface Classes: A guide to the use of interface classes for defining contracts and ensuring consistent implementation.
  • Exception Handling & Classes: Learn how exceptions are handled in Luminova, with a focus on custom exception classes and error management.

Error Handling and Debugging

  • Exception & Error Codes: A reference for understanding and utilizing error codes within the Luminova framework to handle issues effectively.
  • Global Error Controller: Centralized error management for catching and displaying errors throughout your application.
  • Application Debugging: Tools and strategies for debugging your application, including enabling debug mode and inspecting logs.

Developer Tools

Command Line Tools

  • Novakit Commands: Access a collection of commands in the Novakit toolset for enhancing command-line development.
  • PHP Development Server: Running a built-in PHP development server for local application testing and debugging.
  • Command Helper Class (Terminal): A class providing utility methods for working with the terminal, including handling input/output.
  • Command Text Util: Utilize text utilities for formatting and managing output within command-line applications.
  • Command Color Util: Enhance command-line output with color formatting for better readability and user interaction.
  • Command Ascii Image Art: Generate ASCII art images for visual representation within command-line applications.
  • Command Examples: Practical examples showcasing how to use the available command-line tools and utilities effectively.

Real-Time Communication

  • HTTP Socket Server: Set up and manage an HTTP socket server for real-time communication within web applications.
  • HTTP Socket Server Examples: Example implementations and use cases for the HTTP socket server in real-time applications.