axelitus / acre-common
axelitus's Acre common classes.
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2022-02-01 12:21:14 UTC
README
Acre Common is a sub-package of Acre. It contains classes for the common usage, mainly extensions and tools for basic types (strings, numbers, etc.). For more information about the Acre initiative please visit this link.
Package Information
- Main Package: Acre
- Category: Common
- Author: Axel Pardemann (dev@axelitus.mx)
- Build Status (master):
- Repository: php-acre-common at GitHub
- Composer Package: axelitus/acre-common at Packagist
- Issue Tracker: GitHub's issue tracker
Standards
As a code reuse initiative, this package should follow some standards so it can be easily used by anyone who wants to. Recently there has been an initiative to standardize the chunks of code everyone is building so the wheel must not be reinvented everytime someone needs to do something. There's a group PHP-FIG (Framework Interop Group) that's behind this initiative of allowing the built libraries to be interchangeable between frameworks and systems.
There are already some standards marked as accepted (final): PSR-0, PSR-1 and PSR-2.
This package is PSR-2 compliant.
Being PSR-2 compliant means this package can be easily installed by using Composer from the Packagist package archive. Just follow the instructions in section How to install.
Contents
- Num: Tools for numeric types.
- Str: Tools for string types.
How to install
To install this package and use it in your app just follow these instructions (if you haven't read the documentation from Composer please do so before you continue):
-
Download composer if you haven't already done so (use your preferred method):
curl -s https://getcomposer.org/installer | php
-
Place a require statement inside your
composer.json
file replacing<version>
with the desired version:"require": { "axelitus/acre-common": "" }
-
Run the composer installer to resolve dependencies and download the packages:
php composer.phar install
-
In order to use the packages you have to load the autoloader that was generated by composer:
require 'vendor/autoload.php';
-
Finally just use the package classes as needed:
axelitus\Acre\Common\Num::isInt($value);