alphalabs / common
Toolbox which let's you play with ease with primitive types and common objects
Installs: 6 798
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=5.3.3
This package is not auto-updated.
Last update: 2024-11-05 03:03:45 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