Luminova Framework

Utility Classes & Helpers

Utility classes and helpers provide reusable methods like arrays, strings, objects, asynchronous operations, lazy objects, and promise handling. They simplify repetitive coding tasks across your project.

Table of Contents

  1. PHP Array Object Helper Class

    Luminova’s Array Helper class provides useful methods for initializing and managing arrays.

  2. PHP Fiber Asynchronous Tasks and Execution

    The Async class leverages PHP's `Fiber` to execute tasks asynchronously, allowing easy concurrent jobs management. It provides methods for queuing, running, and awaiting the completion of tasks.

  3. Asynchronous Executions using Intervals

    Interval class mimics the behavior of JavaScript's setInterval using PHP Fibers.

  4. PHP Common Helper Functions

    The common helpers provide a set of static utility methods for formatting, validating, and normalizing data. They include features such as string and email masking, phone number formatting, and more

  5. Managing and Emitting Custom Events Using Observers

    Whether you need to listen for user actions, manage system events, or trigger custom workflows, The Event class offers a simple yet powerful solution to orchestrate event handling across your project.

  6. FIFO Tasks Queue Execution

    The Queue Utility is a simple and efficient module for executing tasks in FIFO order. It utilizes PHP Fiber if available or alternative methods if not supported.

  7. Input Sanitization and Escaper

    Escaper provides essential methods for escaping and sanitizing data to enhance security and prevent vulnerabilities, this ensures that user-generated input is safely handled across different contexts.

  8. Proxy and IP Address Management

    Manage and retrieve the client’s IP address, detect proxies or Tor exit nodes, and fetch detailed info via IPHub or IPApi.

  9. Lazy Load Object Initialization

    The lazy object provides a proxy for lazily instantiating an object. The actual object is not initialized until one of its methods or properties is accessed.

  10. Lazy Load Object Trait Initialization

    The lazy object provides a proxy for lazily instantiating an object. The actual object is not initialized until one of its methods or properties is accessed.

  11. Basic Mathematical Operations Helpers

    Provides basic methods for currency conversion, unit conversion, averages, ratings, discounts, distance and interest calculations.

  12. PHP Object Inheritance and Prototype Chain

    Enables JavaScript-like prototypal behavior in PHP. The Prototypeable trait allows you to dynamically add, modify or remove methods and properties at runtime, offering a clean type-safe implementation

  13. Pipeline-Based Data Processing and Transformation

    The Pipeline class is a simple utility class that allows data to flow through a series of transformations, operations, and error-handling steps.

  14. Command Execution using Process Handler

    Process Handler simplifies executing command processes. It supports multiple execution methods like popen, proc_open, and shell_exec, as well as running closures and working with stream interfaces.

  15. Promise Object for Asynchronous Operations

    Promise object helps you handle asynchronous operations with clean, structured control over success, failure, and cancellation states. Includes support for deferred, chained, and third-party promises.

  16. Promise Utility Classes

    Use Luminova’s Deferred, Fulfilled, and Rejected classes to simplify promise handling, manage pre-resolved states, and improve async logic clarity.

  17. String Listification Implementation

    The Luminova string Lists class is a versatile tool for converting between string lists and arrays, providing a straightforward way to handle structured data in a string format.

  18. PHP String Object Helper Class

    An object-oriented, string object utility class for PHP. It simplifies string manipulation with built-in methods for casing, trimming, masking, pattern matching, slug generation, and prototype.