Download the PHP package php-architecture-kit/actor without Composer
On this page you can find all versions of the php package php-architecture-kit/actor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download php-architecture-kit/actor
More information about php-architecture-kit/actor
Files in php-architecture-kit/actor
Download php-architecture-kit/actor
More information about php-architecture-kit/actor
Files in php-architecture-kit/actor
Vendor php-architecture-kit
Package actor
Short Description Actor abstraction for PHP applications - represents who performs actions in the system.
License MIT
Homepage https://github.com/php-architecture-kit/actor
Package actor
Short Description Actor abstraction for PHP applications - represents who performs actions in the system.
License MIT
Homepage https://github.com/php-architecture-kit/actor
Please rate this library. Is it a good library?
Informations about the package actor
php-architecture-kit/actor
Actor abstraction for PHP applications. Represents who performs actions in the system - users, system processes, or unknown sources.
Features
- Actor interface - Simple contract with
identifier()method - IdentifiedActor - For actors with UUID-based identity (users, entities)
- NamedActor - For system processes (cron, workers, schedulers)
- UnknownActor - For anonymous or unidentified actors
- ActorId - UUID-based identity extending
php-architecture-kit/uuid - PHP 7.4+ - Compatible with legacy and modern PHP
Installation
Quick Start
Actor Implementations
| Actor | Use Case | Identifier |
|---|---|---|
IdentifiedActor |
Users, entities with UUID | UUID string |
NamedActor |
Cron jobs, workers, services | Custom name |
UnknownActor |
Anonymous, unidentified | 'unknown' |
Creating Domain-Specific Actors
Extend base actors for your domain:
Usage in Aggregates
Pass Actor to aggregate methods for authorization and audit:
Usage in Domain Events
Track who performed actions:
Creating Actor from Request (Infrastructure)
API Reference
Actor (interface)
| Method | Description |
|---|---|
identifier(): string |
Returns unique identifier for the actor |
IdentifiedActor
| Method | Description |
|---|---|
__construct(ActorId $id) |
Create actor with UUID identity |
identifier(): string |
Returns UUID string |
NamedActor
| Method | Description |
|---|---|
__construct(string $name) |
Create actor with custom name |
identifier(): string |
Returns the name |
UnknownActor
| Method | Description |
|---|---|
identifier(): string |
Returns 'unknown' |
IDENTIFIER (const) |
'unknown' |
ActorId
Extends Uuid - all UUID methods available. See php-architecture-kit/uuid.
Testing
Package is tested with PHPUnit in the php-architecture-kit/workspace project.
License
MIT
All versions of actor with dependencies
PHP Build Version
Package Version
The package php-architecture-kit/actor contains the following files
Loading the files please wait ...