archict / core
Heart of Archict, this library load and manage Bricks
Installs: 1 436
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 3
Requires
- php: >= 8.2
- composer-runtime-api: ^2.2
- archict/brick: ^1.0
- azjezz/psl: ^3.0
- composer/class-map-generator: ^1.3
- cuyz/valinor: ^1.12
- psr/simple-cache: ^3.0
- symfony/yaml: ^7.0
- vlucas/phpdotenv: ^5.6
Requires (Dev)
- phpstan/phpstan: ^1.10 || ^2.0
- phpunit/phpunit: ^10
- slevomat/coding-standard: ^8.15
- squizlabs/php_codesniffer: ^3.9
- vimeo/psalm: ^5.22
This package is auto-updated.
Last update: 2025-03-10 12:57:47 UTC
README
In the Land of PHP where the Shadows lie.
One Brick to rule them all, One Brick to find them,
One Brick to bring them all, and in the darkness bind them
In the Land of PHP where the Shadows lie.
Heart of Archict, this library load and manage Bricks.
Usage
<?php use Archict\Core\Core; use Archict\Core\Event\EventDispatcher; $core = Core::build(); // Load Services and Events $core->load(); // Access to all Services $manager = $core->service_manager; $dispatcher = $manager->get(EventDispatcher::class); $dispatcher->dispatch(new MyEvent());
That's all!
Please note that if your package is also a Brick, it will scan only src
and include
directory for Services.
Supplied Services
ServiceManager
With ServiceManager::get(class-string)
you can retrieve any Service. But it's better if you use automatic Service
injection in your own Service constructor.
EventDispatcher
With EventDispatcher::dispatch(mixed)
you can dispatch an Event to all its listeners.
CacheInterface
Implementation of PSR-16 cache system.