ApiPlatform\SchemaGenerator\AnnotationGenerator\DoctrineOrmAnnotationGenerator::getRelationName PHP Method

getRelationName() private method

Gets class or interface name to use in relations.
private getRelationName ( string $range ) : string
$range string
return string
    private function getRelationName($range)
    {
        $class = $this->classes[$range];
        if (isset($class['interfaceName'])) {
            return $class['interfaceName'];
        }
        if (isset($this->config['types'][$class['name']]['namespaces']['class'])) {
            return sprintf('%s\\%s', $this->config['types'][$class['name']]['namespaces']['class'], $class['name']);
        }
        if (isset($this->config['namespaces']['entity'])) {
            return sprintf('%s\\%s', $this->config['namespaces']['entity'], $class['name']);
        }
        return $class['name'];
    }