src/Image/Server.php
private function parseRequestUri(): void
    {
        $requestUri = $this->baseClass->getRequestUri();
        $path = \explode('/', $requestUri);
        $pathCnt = \count($path);
        if ($pathCnt > 0) {
            $file = \array_pop($path);
            $path = \sprintf('%%DOCUMENT_ROOT%%%s%s', \implode(DIRECTORY_SEPARATOR, $path), DIRECTORY_SEPARATOR);
            $path = $this->baseClass->parsePath($path);

            $file = \explode('.', $file);
            $ext = '';

            if (\count($file) > 1) {
                $ext = \array_pop($file);
            }

            $file = \explode('__', \implode('.', $file));
            $resizeParams = [];

            if (\count($file) > 1) {
                $resizeParams = $this->parseResizeParams(\explode('_', $file[1]));
            }

            $file = $file[0];

            $this->uriParams['path'] = $path;
            $this->uriParams['file'] = $file;
            $this->uriParams['extension'] = $ext;
            $this->uriParams['resize-params'] = $resizeParams;
        }
    }
private function parseRequestUri(): void
    {
        $requestUri = $this->baseClass->getRequestUri();
        $path = \explode('/', $requestUri);
        $pathCnt = \count($path);
        if ($pathCnt > 0) {
            $file = \array_pop($path);
            $path = \sprintf('%%DOCUMENT_ROOT%%%s%s', \implode(DIRECTORY_SEPARATOR, $path), DIRECTORY_SEPARATOR);
            $path = $this->baseClass->parsePath($path);

            $file = \explode('.', $file);
            $ext = '';

            if (\count($file) > 1) {
                $ext = \array_pop($file);
            }

            $file = \explode('__', \implode('.', $file));
            $resizeParams = [];

            if (\count($file) > 1) {
                $resizeParams = $this->parseResizeParams(\explode('_', $file[1]));
            }

            $file = $file[0];

            $this->uriParams['path'] = $path;
            $this->uriParams['file'] = $file;
            $this->uriParams['extension'] = $ext;
            $this->uriParams['resize-params'] = $resizeParams;
        }
    }
private function parseRequestUri ( ) : void { $ requestUri = $ this -> baseClass -> getRequestUri ( ) ; $ path = \ explode ( '/' , $ requestUri ) ; $ pathCnt = \ count ( $ path ) ; if ( $ pathCnt > 0 ) { $ file = \ array_pop ( $ path ) ; $ path = \ sprintf ( '%%DOCUMENT_ROOT%%%s%s' , \ implode ( DIRECTORY_SEPARATOR , $ path ) , DIRECTORY_SEPARATOR ) ; $ path = $ this -> baseClass -> parsePath ( $ path ) ; $ file = \ explode ( '.' , $ file ) ; $ ext = '' ; if ( \ count ( $ file ) > 1 ) { $ ext = \ array_pop ( $ file ) ; } $ file = \ explode ( '__' , \ implode ( '.' , $ file ) ) ; $ resizeParams = [ ] ; if ( \ count ( $ file ) > 1 ) { $ resizeParams = $ this -> parseResizeParams ( \ explode ( '_' , $ file [ 1 ] ) ) ; } $ file = $ file [ 0 ] ; $ this -> uriParams [ 'path' ] = $ path ; $ this -> uriParams [ 'file' ] = $ file ; $ this -> uriParams [ 'extension' ] = $ ext ; $ this -> uriParams [ 'resize-params' ] = $ resizeParams ; } }
Parses request uri
Parses request uri