OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
32
app/Core/Resources/ResourcesServiceProvider.php
Normal file
32
app/Core/Resources/ResourcesServiceProvider.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user