Load an entity from a URI I have a URI 'entity:node/27' and I want to load this entity, but I cannot find the correct helper function or class to use. 

I do not want to explode the string or regex the string, I am fairly sure there is a function for this.
$params = Url::fromUri("internal:" . $source_uri)-&gt;getRouteParameters();
$entity_type = key($params);
$entity = \Drupal::entityTypeManager()-&gt;getStorage($entity_type)-&gt;load($params[$entity_type]);