You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
::getUnit
and checking for exceptions.The text was updated successfully, but these errors were encountered: