Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (61) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-04-22 (3 hours ago) | Not enough user ratings | Total: 281 | All time: 7,601 This week: 30 |
Version | License | PHP version | Categories | |||
esi_utility 2.1.0 | MIT/X Consortium ... | 8.2.0 | Tools, Libraries, PHP 7 |
Description | Author | |
This class provides a collection of various PHP utility functions. Currently it provides functions to: |
Utility is a small collection of useful functions that are aimed to make developers' lives just a tad bit easier.
Install the latest version with:
$ composer require esi/utility
Then, within your project (if not already included), include composer's autoload. For example:
<?php
require 'vendor/autoload.php';
?>
Utility is a set of classes that are broken down into several "components":
Utilities
* Arrays * Conversion * Dates * Environment * Filesystem * Image * Numbers * Strings
As an example, let's say you want to convert a string to title case. To do so:
<?php
use Esi\Utility\Strings;
$title = Strings::title('this is my title');
echo $title;
?>
All methods of found within Utility's classes are static. So, for example, to retrieve the information for a particular timezone:
<?php
use Esi\Utility\Dates;
$timezone = Dates::timezoneInfo('America/New_York');
print_r($timezone);
/*
Array
(
[offset] => -5
[country] => US
[latitude] => 40.71416
[longitude] => -74.00639
[dst] =>
)
*/
?>
Please see docs or view online.
Bugs and feature requests are tracked on GitHub
Issues are the quickest way to report a bug. If you find a bug or documentation error, please check the following first:
See CONTRIBUTING.
Eric Sizemore - <admin@secondversion.com> - <https://www.secondversion.com>
Utility is licensed under the MIT License - see the LICENSE
file for details
This library is inspired by Brandon Wamboldt's utilphp library.
Files |
File | Role | Description | ||
---|---|---|---|---|
.github (3 files, 2 directories) | ||||
docs (16 files) | ||||
src (8 files) | ||||
tests (1 file, 2 directories) | ||||
.php-cs-fixer.dist.php | Example | Example script | ||
.scrutinizer.yml | Data | Auxiliary data | ||
backward-compatibility.md | Data | Auxiliary data | ||
CHANGELOG.md | Data | Auxiliary data | ||
CODE_OF_CONDUCT.md | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
CONTRIBUTING.md | Data | Auxiliary data | ||
LICENSE.md | Lic. | License text | ||
mkdocs.yml | Data | Auxiliary data | ||
phpstan-baseline.neon | Data | Auxiliary data | ||
phpstan.neon | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
README.md | Doc. | Documentation | ||
renovate.json | Data | Auxiliary data | ||
SECURITY.md | Data | Auxiliary data |
Files | / | .github |
File | Role | Description | ||
---|---|---|---|---|
ISSUE_TEMPLATE (3 files) | ||||
workflows (2 files) | ||||
dependabot.yml | Data | Auxiliary data | ||
FUNDING.yml | Data | Auxiliary data | ||
pull_request_template.md | Data | Auxiliary data |
Files | / | .github | / | ISSUE_TEMPLATE |
File | Role | Description |
---|---|---|
1-bug_report.yml | Data | Auxiliary data |
2-feature_request.yml | Data | Auxiliary data |
config.yml | Data | Auxiliary data |
Files | / | docs |
File | Role | Description |
---|---|---|
arrays.md | Data | Auxiliary data |
backward-compatibility.md | Data | Auxiliary data |
basic-usage.md | Data | Auxiliary data |
code-of-conduct.md | Data | Auxiliary data |
contributing.md | Data | Auxiliary data |
conversion.md | Data | Auxiliary data |
dates.md | Data | Auxiliary data |
environment.md | Data | Auxiliary data |
filesystem.md | Data | Auxiliary data |
image.md | Data | Auxiliary data |
index.md | Data | Auxiliary data |
installation.md | Data | Auxiliary data |
license.md | Lic. | License text |
numbers.md | Data | Auxiliary data |
security.md | Data | Auxiliary data |
strings.md | Data |
Files | / | src |
File | Role | Description |
---|---|---|
Arrays.php | Class | Class source |
Conversion.php | Class | Class source |
Dates.php | Class | Class source |
Environment.php | Class | Class source |
Filesystem.php | Class | Class source |
Image.php | Class | Class source |
Numbers.php | Class | Class source |
Strings.php | Class | Class source |
Files | / | tests |
File | Role | Description | ||
---|---|---|---|---|
resources (4 files) | ||||
src (8 files) | ||||
bootstrap.php | Aux. | Auxiliary script |
Files | / | tests | / | resources |
File | Role | Description |
---|---|---|
notAnImage.txt | Data | Auxiliary data |
testImage.gif | Icon | Icon image |
testImage.jpg | Icon | Icon image |
testImage.png | Icon | Icon image |
Files | / | tests | / | src |
File | Role | Description |
---|---|---|
ArraysTest.php | Class | Class source |
ConversionTest.php | Class | Class source |
DatesTest.php | Class | Class source |
EnvironmentTest.php | Class | Class source |
FilesystemTest.php | Class | Class source |
ImageTest.php | Class | Class source |
NumbersTest.php | Class | Class source |
StringsTest.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
98% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.