private function findStaticAliases(?array $map = null, ?string $pathway = null): ?string
    {
        if (!$map) {
            return $pathway;
        }

        // current pathway is found as "old path" (or alias target). Make redirect to new pathway.
        if (Arr::in($pathway, $map)) {
            // find "new path" as binding uri slug
            $binding = array_search($pathway, $map, true);
            // build url to redirection
            $url = $this->getSchemeAndHttpHost() . $this->getBasePath() . '/';
            if (App::$Properties->get('multiLanguage')) {
                $url .= $this->language . '/';
            }
            $url .= ltrim($binding, '/');

            $redirect = new RedirectResponse($url);
            $redirect->send();
            exit();
        }

        // current pathway request is equal to path alias. Set alias to property.
        if (array_key_exists($pathway, $map)) {
            $pathway = $map[$pathway];
            $this->aliasPathTarget = $pathway;
        }

        return $pathway;
    }
private function findStaticAliases(?array $map = null, ?string $pathway = null): ?string
    {
        if (!$map) {
            return $pathway;
        }

        // current pathway is found as "old path" (or alias target). Make redirect to new pathway.
        if (Arr::in($pathway, $map)) {
            // find "new path" as binding uri slug
            $binding = array_search($pathway, $map, true);
            // build url to redirection
            $url = $this->getSchemeAndHttpHost() . $this->getBasePath() . '/';
            if (App::$Properties->get('multiLanguage')) {
                $url .= $this->language . '/';
            }
            $url .= ltrim($binding, '/');

            $redirect = new RedirectResponse($url);
            $redirect->send();
            exit();
        }

        // current pathway request is equal to path alias. Set alias to property.
        if (array_key_exists($pathway, $map)) {
            $pathway = $map[$pathway];
            $this->aliasPathTarget = $pathway;
        }

        return $pathway;
    }
private function findStaticAliases ( ? array $ map = null , ? string $ pathway = null ) : ? string { if ( ! $ map ) { return $ pathway ; } // current pathway is found as "old path" (or alias target). Make redirect to new pathway. if ( Arr :: in ( $ pathway , $ map ) ) { // find "new path" as binding uri slug $ binding = array_search ( $ pathway , $ map , true ) ; // build url to redirection $ url = $ this -> getSchemeAndHttpHost ( ) . $ this -> getBasePath ( ) . '/' ; if ( App :: $ Properties -> get ( 'multiLanguage' ) ) { $ url .= $ this -> language . '/' ; } $ url .= ltrim ( $ binding , '/' ) ; $ redirect = new RedirectResponse ( $ url ) ; $ redirect -> send ( ) ; exit ( ) ; } // current pathway request is equal to path alias. Set alias to property. if ( array_key_exists ( $ pathway , $ map ) ) { $ pathway = $ map [ $ pathway ] ; $ this -> aliasPathTarget = $ pathway ; } return $ pathway ; }
Prepare static pathway aliasing for routing
@param array|null $map
@param string|null $pathway
@return string|null
Prepare static pathway aliasing for routing