src/Sulu/Bundle/RouteBundle/Generator/ChainRouteGenerator.php
protected function getClassMappingConfiguration($className)
    {
        if (array_key_exists($className, $this->mappings)) {
            return [
                'className' => $className,
                'mapping' => $this->mappings[$className],
            ];
        }

        $reflection = new \ReflectionClass($className);
        while ($reflection = $reflection->getParentClass()) {
            if (array_key_exists($reflection->getName(), $this->mappings)) {
                return [
                    'className' => $reflection->getName(),
                    'mapping' => $this->mappings[$reflection->getName()],
                ];
            }
        }

        throw new MissingClassMappingConfigurationException($className, array_keys($this->mappings));
    }
protected function getClassMappingConfiguration($className)
    {
        if (array_key_exists($className, $this->mappings)) {
            return [
                'className' => $className,
                'mapping' => $this->mappings[$className],
            ];
        }

        $reflection = new \ReflectionClass($className);
        while ($reflection = $reflection->getParentClass()) {
            if (array_key_exists($reflection->getName(), $this->mappings)) {
                return [
                    'className' => $reflection->getName(),
                    'mapping' => $this->mappings[$reflection->getName()],
                ];
            }
        }

        throw new MissingClassMappingConfigurationException($className, array_keys($this->mappings));
    }
protected function getClassMappingConfiguration ( $ className ) { if ( array_key_exists ( $ className , $ this -> mappings ) ) { return [ 'className' => $ className , 'mapping' => $ this -> mappings [ $ className ] , ] ; } $ reflection = new \ ReflectionClass ( $ className ) ; while ( $ reflection = $ reflection -> getParentClass ( ) ) { if ( array_key_exists ( $ reflection -> getName ( ) , $ this -> mappings ) ) { return [ 'className' => $ reflection -> getName ( ) , 'mapping' => $ this -> mappings [ $ reflection -> getName ( ) ] , ] ; } } throw new MissingClassMappingConfigurationException ( $ className , array_keys ( $ this -> mappings ) ) ; }
Get class mapping configuration by class name or inheritance chain.

@param string $className

@return array

@throws MissingClassMappingConfigurationException
Get class mapping configuration by class name or inheritance chain .