Download the PHP package cyberomulus/php-toolbox without Composer
On this page you can find all versions of the php package cyberomulus/php-toolbox. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cyberomulus/php-toolbox
More information about cyberomulus/php-toolbox
Files in cyberomulus/php-toolbox
Package php-toolbox
Short Description Simple php toolbox for not to reinvent the wheel!
License MIT
Homepage https://github.com/cyberomulus/phpToolbox
Informations about the package php-toolbox
phpToolbox
Simple php toolbox for not to reinvent the wheel!
Why this library ?
Every day, we write the same functions for our different projects.
This library contains a multiple functions so as not to have to write them each time.
It also brings some advantages:
- All functions is tested by phpunit
- The functions are organized in a structured way in special classes.
You can use a single class with a simplenew classOne()
or access the different class by a main class (useful for declaring as a service in a framework) - A documentation with phpdoc
Requirements
- php 7.3 or higher, if you use a lower version see BRANCHES.md
Installation
Download whith composer :
composer require cyberomulus/php-toolbox:1.2.*
How to use ?
By single class
For use a single class, you can simply create an instance to use it.
For example, use the functions of manipulation and verification of texts:
$textManip = new Cyberomulus\PhpToolbox\Text();
$bool = $textManip->startWith("simple example", "example");
By main class (for use by service)
If you use a framework, a good practice is to declare this lib as a service.
In order not to have to declare as many services as class, a class provider exists: Cyberomulus\PhpToolbox\PhpToolbox\
.
Once the service is created, you will have access to each class containing the functions:
$textManip = $this->getService("phpToolBox")->getText();
$bool = $textManip->startWith("simple example", "example");
If you use Symfony >4.0 you can use the bundle cyberomulus/phpToolboxBundle for inject this class in a service.
Class list
- PhpToolbox : This class contains a getter for each of the individual classes. If you want to use this lib as a framework service, you can declare this class to use a single service
- Text : This class contains useful functions for manipulating and verifying text
- IO : This class contains useful functions for read and write (on filesystem, console, network)
- Datetime : This class contains useful functions for manipulate date, time and timezone
Documentation
All functions have a phpdoc and doc inline.
Want more ?
You just have to ask
You can request a new function in issue
Contribute
Your pull requests are welcome!!
Sharing is the strength of this lib.
Please read branches schema and simply:
- fork from
master
- create pull request to
master
Contributors
- Cyberomulus
License
This library is open-source software licensed under the MIT license.