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
- PHP Array Object Helper Class
Luminova’s Array Helper class provides useful methods for initializing and managing arrays.
- 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.
- Asynchronous Executions using Intervals
Interval class mimics the behavior of JavaScript's setInterval using PHP Fibers.
- 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
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Basic Mathematical Operations Helpers
Provides basic methods for currency conversion, unit conversion, averages, ratings, discounts, distance and interest calculations.
- 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
- 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.
- 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.
- 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.
- Promise Utility Classes
Use Luminova’s Deferred, Fulfilled, and Rejected classes to simplify promise handling, manage pre-resolved states, and improve async logic clarity.
- 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.
- 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.