star / identity
Library of classes that encapsulates identity concepts.
Installs: 1 701
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 1
Requires
- php: ^7.4|^8.0
Requires (Dev)
- infection/infection: ^0.26.15
- phpstan/phpstan: ^1.8
- phpstan/phpstan-phpunit: ^1.1
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-11-16 20:06:38 UTC
README
Description
This package defines an interface Star\Component\Identity\Identity
to mark your object as entity.
It also includes some default implementations.
Usage
Installation
Run composer require star/identity
using composer.
Identities
$integer = new IntegerId(4); $string = new StringId('something'); $composite = new CompositeIdentity($integer, $string); $integer->toString(); // return '4' $string->toString(); // return 'something' $composite->toString(); // return '4 something'
Exception
We also provide exception that comes bundled with messages for your identity.