Download the PHP package geoffroy-aubry/helpers without Composer
On this page you can find all versions of the php package geoffroy-aubry/helpers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download geoffroy-aubry/helpers
More information about geoffroy-aubry/helpers
Files in geoffroy-aubry/helpers
Package helpers
Short Description Some helpers used in several personal packages and a Debug class useful for don't forgetting where debug traces are.
License LGPL-3.0+
Informations about the package helpers
Helpers
Some helpers used in several personal packages
and a Debug
class useful for don't forgetting where debug traces are.
Description
Two classes:
- Helpers,
- Debug.
1. Helpers class
Static methods of Helpers
class:
- arrayMergeRecursiveDistinct
- exec
- flattenArray
- intToMultiple
- numberFormat
- isAssociativeArray
- round
- stripBashColors
- strPutCSV
- ucwordWithDelimiters
- utf8Encode
- getCurrentTimeWithCS
- dateTimeToTimestamp
- generateMongoId
arrayMergeRecursiveDistinct()
exec()
flattenArray()
Example:
⇒
intToMultiple()
Example:
⇒
numberFormat()
isAssociativeArray()
round()
stripBashColors()
strPutCSV()
ucwordWithDelimiters()
Example:
⇒
utf8Encode()
getCurrentTimeWithCS()
Example:
⇒
dateTimeToTimestamp()
Example:
⇒
generateMongoId()
Example:
⇒
2. Debug class
Debug class useful for don't forgetting where debug traces are.
Automatically decorates print_r()
and var_dump()
with following information:
- file and line of the caller
- name of function/method containing the call
- name of the parameter passed during call
Demo
See debug.php script for an example:
Here is the result:
htmlVarDump()
htmlPrintr()
printr()
varDump()
Usage
Helpers is available via Packagist.
-
Class autoloading and dependencies are managed by Composer so install it following the instructions on Composer: Installation - *nix or just run the following command:
- Add dependency to
GAubry\Helpers
into require section of yourcomposer.json
:
and run php composer.phar install
from the terminal into the root folder of your project.
- Include Composer's autoloader and use the
GAubry\Helpers
classes:
Documentation
API documentation
is generated by ApiGen in the doc/api
folder.
Copyrights & licensing
Licensed under the GNU Lesser General Public License v3 (LGPL version 3). See LICENSE file for details.
Change log
See CHANGELOG file for details.
Continuous integration
Following commands are executed during each build and must report neither errors nor warnings:
-
Unit tests with PHPUnit:
-
Coding standards with PHP CodeSniffer:
- Code quality with PHP Mess Detector:
Git branching model
The git branching model used for development is the one described and assisted by twgit
tool: https://github.com/Twenga/twgit.