kaihempel/identifier

Id abstraction class

1.0.0 2016-04-03 20:54 UTC

This package is not auto-updated.

Last update: 2024-05-03 18:55:00 UTC


README

PHP ID abstraction bundle

Build Status Scrutinizer Code Quality Code Coverage

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)
   {
   ...
   }
   ...