src/Server.php
public function getSourcePath($path)
    {
        $path = trim($path, '/');
        
        $baseUrl = $this->baseUrl.'/';

        if (substr($path, 0, strlen($baseUrl)) === $baseUrl) {
            $path = trim(substr($path, strlen($baseUrl)), '/');
        }

        if ($path === '') {
            throw new FileNotFoundException('Image path missing.');
        }

        if ($this->sourcePathPrefix) {
            $path = $this->sourcePathPrefix.'/'.$path;
        }

        return rawurldecode($path);
    }
public function getSourcePath($path)
    {
        $path = trim($path, '/');
        
        $baseUrl = $this->baseUrl.'/';

        if (substr($path, 0, strlen($baseUrl)) === $baseUrl) {
            $path = trim(substr($path, strlen($baseUrl)), '/');
        }

        if ($path === '') {
            throw new FileNotFoundException('Image path missing.');
        }

        if ($this->sourcePathPrefix) {
            $path = $this->sourcePathPrefix.'/'.$path;
        }

        return rawurldecode($path);
    }
public function getSourcePath ( $ path ) { $ path = trim ( $ path , '/' ) ; $ baseUrl = $ this -> baseUrl . '/' ; if ( substr ( $ path , 0 , strlen ( $ baseUrl ) ) === $ baseUrl ) { $ path = trim ( substr ( $ path , strlen ( $ baseUrl ) ) , '/' ) ; } if ( $ path === '' ) { throw new FileNotFoundException ( 'Image path missing.' ) ; } if ( $ this -> sourcePathPrefix ) { $ path = $ this -> sourcePathPrefix . '/' . $ path ; } return rawurldecode ( $ path ) ; }
Get source path.
@param  string                $path Image path.
@return string                The source path.
@throws FileNotFoundException
Get source path .