blok / utils
A series of utilites functions for PHP
Installs: 6 542
Dependents: 5
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
This package is auto-updated.
Last update: 2024-11-20 20:36:46 UTC
README
Utilities script for PHP projects
Installation
Install via composer
composer require blok/utils
Usage
Arr
Blok\Utils\Arr is a bunch of array related methods utilities that you can use as static call exemple :
Blok\Utils\Arr::csvToArray('xxx.csv')
Will transform a csv file to an array
Str
Blok\Utils\Str is a bunch of String related methods utilities that you can use as static call exemple :
Str::smrtr('{hello} world', ["hello", "Hello"])
Will replace the braced {hello} with the value of the array
Utils
Blok\Utils\Utils is a bunch of common PHP utils methods that you can use as static call exemple :
Utils::getJSON("xxx.json"")
Will make a file_get_contents + a json_decode
Utils::removeSubfolder($your_dir, ".git"")
Will remove all the .git folder.
Security
If you discover any security related issues, please email instead of using the issue tracker.