maximaster/self-registry

There is no license information available for the latest version (0.0.1) of this package.

Trait to make class to act like self-registry

0.0.1 2021-03-01 08:15 UTC

This package is auto-updated.

Last update: 2024-10-29 06:12:27 UTC


README

Trait to make class to act like self-registry

Usage

composer require maximaster/self-registry
use Maximaster\SelfRegistry\SelfRegistryTrait;

class ApiClient
{
    use SelfRegistryTrait;
}
$apiClient = new ApiClient();
$apiClient->registerItself();

// in the other part of an application

$apiClient = ApiClient::getInstance();