public function generateStaticPrefix($id, $idPrefix)
{
if (0 == strlen($idPrefix)) {
throw new \LogicException('Can not determine the prefix. Either this is a new, unpersisted document or the listener that calls setPrefix is not set up correctly.');
}
if (strncmp($id, $idPrefix, strlen($idPrefix))) {
throw new \LogicException("The id prefix '{$idPrefix}' does not match the route document path '{$id}'");
}
$url = substr($id, strlen($idPrefix));
if (empty($url)) {
$url = '/';
}
return $url;
}