kaihempel / identifier
Id abstraction class
1.0.0
2016-04-03 20:54 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- mockery/mockery: 0.9.*
- phpunit/phpunit: 4.6.*
This package is not auto-updated.
Last update: 2025-01-10 22:06:45 UTC
README
PHP ID abstraction bundle
For easy ID handling inside other projects.
Installing Identifier via Composer.
"require": { "kaihempel/identifier": "1.0.*" }
Using the identifier object instead simple integer variables.
$id = new Identifier(1); if($id->is(1)) // true if($id->is(2)) // false
Use type hinting on method or function signatures to avoid a huge number of numeric checks.
... public function load(Identifier $id) { ... } ...