Utility Classes & Helpers
Table of Contents
- Manage Array Operations Using Arr 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 Background Tasks Queue and Execution
Luminova's Queue Class is a flexible and efficient module for managing asynchronous tasks in (FIFO) order. It utilizes PHP Fiber if available or alternative methods if not supported.
- Asynchronous Executions using Intervals
Interval class mimics the behavior of JavaScript's setInterval using PHP Fibers.
- Utility Static Methods for Basic Operations
Useful static methods to format and normalize inputs, including validating email and phone numbers or generating randomized strings, EAN, UPC, UUIDs, email masking, and many 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.
- 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.
- Basic Mathematical Operations Helpers
Provides basic methods for currency conversion, unit conversion, averages, ratings, discounts, distance and interest calculations.
- 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 Tasks and Execution
A Promise object represents an asynchronous task that either resolves successfully or rejects with an error, enabling efficient management of asynchronous operations within the Luminova framework.
- 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.