Doctrine\Common\Proxy\ProxyGenerator::isShortIdentifierGetter PHP Method

isShortIdentifierGetter() private method

What does this mean? For proxy objects the identifier is already known, however accessing the getter for this identifier usually triggers the lazy loading, leading to a query that may not be necessary if only the ID is interesting for the userland code (for example in views that generate links to the entity, but do not display anything else).
private isShortIdentifierGetter ( ReflectionMethod $method, Doctrine\Common\Persistence\Mapping\ClassMetadata $class ) : boolean
$method ReflectionMethod
$class Doctrine\Common\Persistence\Mapping\ClassMetadata
return boolean
    private function isShortIdentifierGetter($method, ClassMetadata $class)
    {
        $identifier = lcfirst(substr($method->getName(), 3));
        $startLine = $method->getStartLine();
        $endLine = $method->getEndLine();
        $cheapCheck = $method->getNumberOfParameters() == 0 && substr($method->getName(), 0, 3) == 'get' && in_array($identifier, $class->getIdentifier(), true) && $class->hasField($identifier) && $endLine - $startLine <= 4;
        if ($cheapCheck) {
            $code = file($method->getDeclaringClass()->getFileName());
            $code = trim(implode(' ', array_slice($code, $startLine - 1, $endLine - $startLine + 1)));
            $pattern = sprintf(self::PATTERN_MATCH_ID_METHOD, $method->getName(), $identifier);
            if (preg_match($pattern, $code)) {
                return true;
            }
        }
        return false;
    }