public function getPageNameForPageIdentifier($identifier)
    {
        $pageName = urldecode($identifier);

        if (!$pageName || $pageName[0] === '.' || strpos($pageName, '/.') !== false) {
            throw new InvalidPageIdentifierException('Invalid page identifier');
        }

        if ($pageName[0] === '/') {
            $pageName = substr($pageName, 1);
        }
        if (substr($pageName, -1) === '/') {
            $pageName = substr($pageName, 0, -1);
        }

        return $pageName;
    }
public function getPageNameForPageIdentifier($identifier)
    {
        $pageName = urldecode($identifier);

        if (!$pageName || $pageName[0] === '.' || strpos($pageName, '/.') !== false) {
            throw new InvalidPageIdentifierException('Invalid page identifier');
        }

        if ($pageName[0] === '/') {
            $pageName = substr($pageName, 1);
        }
        if (substr($pageName, -1) === '/') {
            $pageName = substr($pageName, 0, -1);
        }

        return $pageName;
    }
public function getPageNameForPageIdentifier ( $ identifier ) { $ pageName = urldecode ( $ identifier ) ; if ( ! $ pageName || $ pageName [ 0 ] === '.' || strpos ( $ pageName , '/.' ) !== false ) { throw new InvalidPageIdentifierException ( 'Invalid page identifier' ) ; } if ( $ pageName [ 0 ] === '/' ) { $ pageName = substr ( $ pageName , 1 ) ; } if ( substr ( $ pageName , - 1 ) === '/' ) { $ pageName = substr ( $ pageName , 0 , - 1 ) ; } return $ pageName ; }
Returns the page file name for the given page identifier

@param string $identifier
@throws \Cundd\Noshi\Domain\Exception\InvalidPageIdentifierException if the given page identifier is invalid
@return string
Returns the page file name for the given page identifier