protected function getObjectIdentifierFromPathSegment($pathSegment)
{
if ($this->getUriPattern() === '') {
$identifier = rawurldecode($pathSegment);
$object = $this->persistenceManager->getObjectByIdentifier($identifier, $this->objectType);
if ($object !== null) {
return $identifier;
}
} else {
$objectPathMapping = $this->objectPathMappingRepository->findOneByObjectTypeUriPatternAndPathSegment($this->objectType, $this->getUriPattern(), $pathSegment, !$this->lowerCase);
if ($objectPathMapping !== null) {
return $objectPathMapping->getIdentifier();
}
}
return null;
}