kaihempel/identifier

Id abstraction class

Installs: 18

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

pkg:composer/kaihempel/identifier

1.0.0 2016-04-03 20:54 UTC

This package is not auto-updated.

Last update: 2025-12-13 02:32:02 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)
   {
   ...
   }
   ...