public function getRouteNameFromAPath($path)
    {
        $attributes = $this->extractAttributes($path);

        $path = parse_url($path)['path'];
        $path = trim(str_replace('/'.$this->currentLocale.'/', '', $path), "/");

        foreach ($this->translatedRoutes as $route) {
            if (trim($this->substituteAttributesInRoute($attributes, $this->translator->trans($route)), '/') === $path) {
                return $route;
            }
        }

        return false;
    }
public function getRouteNameFromAPath($path)
    {
        $attributes = $this->extractAttributes($path);

        $path = parse_url($path)['path'];
        $path = trim(str_replace('/'.$this->currentLocale.'/', '', $path), "/");

        foreach ($this->translatedRoutes as $route) {
            if (trim($this->substituteAttributesInRoute($attributes, $this->translator->trans($route)), '/') === $path) {
                return $route;
            }
        }

        return false;
    }
public function getRouteNameFromAPath ( $ path ) { $ attributes = $ this -> extractAttributes ( $ path ) ; $ path = parse_url ( $ path ) [ 'path' ] ; $ path = trim ( str_replace ( '/' . $ this -> currentLocale . '/' , '' , $ path ) , "/" ) ; foreach ( $ this -> translatedRoutes as $ route ) { if ( trim ( $ this -> substituteAttributesInRoute ( $ attributes , $ this -> translator -> trans ( $ route ) ) , '/' ) === $ path ) { return $ route ; } } return false ; }
Returns the translation key for a given path.

@param string $path Path to get the key translated

@return string|false Key for translation, false if not exist
Returns the translation key for a given path .