private function getFilename(RequestInterface $request, $indexExt = 'html')
    {
        $path = urldecode($request->getUri()->getPath());
        $parts = pathinfo($path);
        $path = isset($parts['dirname']) ? $parts['dirname'] : '';
        $filename = isset($parts['basename']) ? $parts['basename'] : '';

        //if it's a directory, append the index file
        if (empty($parts['extension'])) {
            $filename .= "/index.{$indexExt}";
        }

        if ($this->appendQuery && $request->getUri()->getQuery()) {
            $filename .= '?'.urlencode($request->getUri()->getQuery());
        }

        return Helpers::joinPath($this->directory, $path, $filename);
    }
private function getFilename(RequestInterface $request, $indexExt = 'html')
    {
        $path = urldecode($request->getUri()->getPath());
        $parts = pathinfo($path);
        $path = isset($parts['dirname']) ? $parts['dirname'] : '';
        $filename = isset($parts['basename']) ? $parts['basename'] : '';

        //if it's a directory, append the index file
        if (empty($parts['extension'])) {
            $filename .= "/index.{$indexExt}";
        }

        if ($this->appendQuery && $request->getUri()->getQuery()) {
            $filename .= '?'.urlencode($request->getUri()->getQuery());
        }

        return Helpers::joinPath($this->directory, $path, $filename);
    }
private function getFilename ( RequestInterface $ request , $ indexExt = 'html' ) { $ path = urldecode ( $ request -> getUri ( ) -> getPath ( ) ) ; $ parts = pathinfo ( $ path ) ; $ path = isset ( $ parts [ 'dirname' ] ) ? $ parts [ 'dirname' ] : '' ; $ filename = isset ( $ parts [ 'basename' ] ) ? $ parts [ 'basename' ] : '' ; //if it's a directory, append the index file if ( empty ( $ parts [ 'extension' ] ) ) { $ filename .= "/index.{$indexExt}" ; } if ( $ this -> appendQuery && $ request -> getUri ( ) -> getQuery ( ) ) { $ filename .= '?' . urlencode ( $ request -> getUri ( ) -> getQuery ( ) ) ; } return Helpers :: joinPath ( $ this -> directory , $ path , $ filename ) ; }
Returns the filename of the response file.

@param RequestInterface $request
@param string           $indexExt

@return string
Returns the filename of the response file .