Skip to content
/ core Public

Heart of Archict, this library load and manage Bricks

License

Notifications You must be signed in to change notification settings

Archict/core

Folders and files

NameName
Last commit message
Last commit date
Apr 15, 2024
Dec 23, 2024
Dec 23, 2024
Apr 22, 2024
Apr 22, 2024
Dec 23, 2024
Apr 12, 2024
Apr 25, 2024
Dec 7, 2024
Mar 3, 2025
Apr 25, 2024
Jun 7, 2024
Apr 12, 2024
Dec 7, 2024

Repository files navigation

Archict/core

Tests

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.