elFinder\elFinderVolumeDriver::decode PHP Method

decode() protected method

Decode path from hash
Author: Dmitry (dio) Levashov
Author: Troex Nevelin
protected decode ( $hash ) : string
return string
    protected function decode($hash)
    {
        if (strpos($hash, $this->id) === 0) {
            // cut volume id after it was prepended in encode
            $h = substr($hash, strlen($this->id));
            // replace HTML safe base64 to normal
            $h = base64_decode(strtr($h, '-_.', '+/='));
            // TODO uncrypt hash and return path
            $path = $this->uncrypt($h);
            // append ROOT to path after it was cut in encode
            return $this->_abspath($path);
            //$this->root.($path == DIRECTORY_SEPARATOR ? '' : DIRECTORY_SEPARATOR.$path);
        }
    }