Download the PHP package effectra/data-optimizer without Composer
On this page you can find all versions of the php package effectra/data-optimizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download effectra/data-optimizer
More information about effectra/data-optimizer
Files in effectra/data-optimizer
Package data-optimizer
Short Description The Effectra Data Optimizer package.
License MIT
Informations about the package data-optimizer
Effectra/DataOptimizer PHP Package
DataOptimizer is a PHP package designed to optimize and transform data based on defined rules. It provides a set of classes and interfaces for managing attributes, working with collections, defining data rules, and optimizing data according to those rules.
Features
-
DataAttribute: Manage attributes with methods for setting, getting, and manipulating attribute values.
-
DataCollection: Manipulate and interact with an array of data using various methods.
-
DataRules: Define validation rules and attributes for data with methods to set rules for different data types.
- DataOptimizer: Optimize and transform data based on customizable rules.
Installation
To install the Data Optimizer PHP package, you can use Composer. Run the following command in your project directory:
Usage
1. DataAttribute Class
The DataAttribute
class provides methods for managing attributes. Here are some examples of how to use it:
Set a Single Attribute:
Set Multiple Attributes:
Get All Attributes:
2. DataCollection Class
The DataCollection
class provides various methods to manipulate and interact with an array of data. Here are some examples:
Create a Collection:
Filter the Collection:
Map Over the Collection:
3. DataOptimizer Class
The DataOptimizer
class is designed for optimizing and transforming data based on defined rules. Here's an example of how to use it:
4. DataRules Class
The DataRules
class is used for defining validation rules and attributes for data. Here's an example:
5. DataValidator Class
The DataValidator
class is for validating and processing data. Here's an example:
Contributing
If you'd like to contribute to this project, please fork the repository and submit a pull request.
License
This Data Optimizer PHP package is open-sourced software licensed under the MIT license.