PHP code example of maximaster / self-registry
1. Go to this page and download the library: Download maximaster/self-registry library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
maximaster / self-registry example snippets
use Maximaster\SelfRegistry\SelfRegistryTrait;
class ApiClient
{
use SelfRegistryTrait;
}
$apiClient = new ApiClient();
$apiClient->registerItself();
// in the other part of an application
$apiClient = ApiClient::getInstance();