1. Go to this page and download the library: Download falbar/trait-adapter 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/ */
falbar / trait-adapter example snippets
$oExampleAdapter = ExampleAdapter::make();
$oExampleAdapter = new ExampleAdapter();
namespace App\Classes;
use Akbsit\TraitAdapter\AdapterTrait;
/**
* Class ExampleAdapter
* @package App\Classes
*/
class ExampleAdapter
{
use AdapterTrait;
protected array $arMappingList = [
'id',
'name',
];
/* @var int */
public $id;
/* @var string */
public $name;
}