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-04-29 04:47:05 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();