Object maps
Use inheritance
use Dustin\Encapsulation\AbstractObjectMapping;
class ProductMapping extends AbstractObjectMapping {
protected function getType(): string {
return Product::class;
}
}or a flexible class
use Dustin\Encapsulation\ObjectMapping;
$productMapping = ObjectMapping::create(Product::class);Last updated