Files
Leantime/app/Core/Resources/ResourcesServiceProvider.php
wangruiguo d647428529
Some checks failed
Security Audit / Composer Security Audit (push) Has been cancelled
Security Audit / NPM Security Audit (push) Has been cancelled
Security Audit / CodeQL Analysis (push) Has been cancelled
OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
2026-09-03 18:49:20 +08:00

33 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace Leantime\Core\Resources;
use Illuminate\Support\ServiceProvider;
use Leantime\Core\Resources\Services\ResourcesRegistry;
/**
* Registers the Resources contract surface.
*
* Resources are a plugin-provided data category (people allocations, budget
* lines, dependencies at the program level). Core owns the contract and the
* registry; a plugin (currently PgmPro) registers itself as *the* provider
* from its own boot. Nothing seeded here — an install with no Resources
* plugin gets a registry that resolves to null, which every consumer
* handles as the honest "no provider" state.
*
* See {@see \Leantime\Core\Resources\Contracts\ResourcesGateway}.
*/
class ResourcesServiceProvider extends ServiceProvider
{
/**
* Bind the registry as a singleton — a single provider registration must
* be visible to every consumer for the life of the request.
*/
public function register(): void
{
$this->app->singleton(ResourcesRegistry::class);
}
}