alphalabs / common
Toolbox which let's you play with ease with primitive types and common objects
v1.0.0
2014-04-23 08:28 UTC
Requires
- php: >=5.3.3
This package is not auto-updated.
Last update: 2026-03-10 09:39:57 UTC
README
Toolbox which let's you play with ease with primitive types and common objects
This library offers some tools to deal with some primitives and/or some common objects.
For the moment, few tools are provided for the following types:
- Numbers: Intergers, floats...
- Strings: Detect slug patterns...
Installation
Adds the library in your composer.json file:
"require": { "alphalabs/common": "1.0@dev" }
Don't forget to update your dependencies with composer update
Usage
Adds the use statement for the tools you want to use, and call the static methods directly:
<?php namespace Foo\Bar; use AlphaLabs\Common\Number\Number; class MyClass { public function foo() { $number = "-3"; Number::isStrictlyPositiveInteger($number) // False } }
To come
- Collections
- (propose your ideas)
Credits
- Sylvain Mauduit (@Swop)
License
MIT