Neos\Flow\Persistence\Doctrine\Mapping\Driver\FlowAnnotationDriver::inferJoinTableNameFromClassAndPropertyName PHP Метод

inferJoinTableNameFromClassAndPropertyName() защищенный Метод

Given a class and property name a table name is returned. That name should be reasonably unique.
protected inferJoinTableNameFromClassAndPropertyName ( string $className, string $propertyName ) : string
$className string Model class name the table corresponds to
$propertyName string Name of the property to be joined
Результат string Truncated database table name
    protected function inferJoinTableNameFromClassAndPropertyName($className, $propertyName)
    {
        $prefix = $this->inferTableNameFromClassName($className);
        $suffix = '_' . strtolower($propertyName . '_join');
        // In order to keep backwards compatibility with earlier versions, truncate the table name in two steps:
        if (strlen($prefix . $suffix) > $this->getMaxIdentifierLength()) {
            $prefix = $this->inferTableNameFromClassName($className, $this->getMaxIdentifierLength() - strlen($suffix));
        }
        // Truncate a second time if the property name was too long as well:
        if (strlen($prefix . $suffix) > $this->getMaxIdentifierLength()) {
            return $this->truncateIdentifier($prefix . $suffix, $this->getMaxIdentifierLength());
        } else {
            return $prefix . $suffix;
        }
    }