Download the PHP package ironedge/common-utils without Composer
On this page you can find all versions of the php package ironedge/common-utils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ironedge/common-utils
More information about ironedge/common-utils
Files in ironedge/common-utils
Package common-utils
Short Description Common utilities.
License MIT
Homepage http://www.ironedgesoftware.com
Informations about the package common-utils
Common Utilities
Common utilities, simple to integrate in any project.
Index
- Requirements: These are the requirements to use this component.
- DataTrait: A Trait to create your own configuration classes.
- DataTrait so you can start using it right from scratch.
- OptionsTrait: A Trait to add a simple options API to your classes.
- System Service: This service provides a simple API to interact with your system, with methods to execute CLI commands, create directories, etc.
- Example Files: A list of example PHP files that we provide so you can see how to use the features of this component.
Requirements
- PHP 7.2+
DataTrait
This trait gives you a powerful API to access and manipulate data in an array. It has simple methods to access / set / check of presence of elements at any depth in an array.
NOTE: This trait uses OptionsTrait.
Usage:
Data
We also include a class that already uses the DataTrait.
OptionsTrait
This trait allows you to add a simple Options API to your classes.
Usage:
System Service
This service provides an API to common system operations. It abstracts away the usage of PHP functions to allow you to use them in an OOP way, and adds a lot of useful additional tools.
Command Execution:
Example Files
With this component we provide a set of simple example PHP files implementing the features of this component. You can just go to the examples directories and execute them:
- resources/examples/data.php: Shows the usage of the Data class.
- resources/examples/options.php: Shows the usage of the OptionsTrait.
- resources/examples/system-service.php: Shows the usage of the System Service.
Installation
Execute the following command to install this component with composer: