Similar to #46, is there a way, without using each individual PhysicalQuantity class, to determine which specific PhysicalQuantity class an alias applies to? For example, I want to be able to do something like
// Would return a namespaced classname of \PhpUnitsOfMeasure\PhysicalQuantity\Mass
$className = UnitOfMeasure::getClassByAlias('kilogram');
// or
// Would return an instance of \PhpUnitsOfMeasure\PhysicalQuantity\Mass
$physicalQuantityObject = UnitOfMeasure::getObjectByAlias('kilogram');
I'm open to making a PR to do this, if there's interest. It would benefit me so that I don't have to cycle through each actual PhysicalQuantity class calling ::getUnit and checking for exceptions.
Similar to #46, is there a way, without using each individual PhysicalQuantity class, to determine which specific PhysicalQuantity class an alias applies to? For example, I want to be able to do something like
I'm open to making a PR to do this, if there's interest. It would benefit me so that I don't have to cycle through each actual PhysicalQuantity class calling
::getUnitand checking for exceptions.