ObjectMappings will hold a key-based map of objects of a given class. These objects are not limited to encapsulations. You can choose any class you want.
$productMapping =newProductMapping();// or$productMapping =ObjectMapping::create(Product::class);$productMapping->set('My1004',newProduct()); // is ok$productMapping->set('CU1005',newCustomer()); // will throw an exception