ManaPHP\Store\Adapter\File::_getFileName PHP Method

_getFileName() protected method

protected _getFileName ( string $key ) : string
$key string
return string
    protected function _getFileName($key)
    {
        if ($key[0] === '!') {
            return $this->alias->resolve($this->_dir . '/' . str_replace(':', '/', substr($key, 1)) . $this->_extension);
        }
        if (Text::contains($key, '/')) {
            $parts = explode('/', $key, 2);
            $md5 = $parts[1];
            $file = $this->_dir . '/' . $parts[0] . '/';
            for ($i = 0; $i < $this->_level; $i++) {
                $file .= substr($md5, $i + $i, 2) . '/';
            }
            $file .= $md5;
        } else {
            $file = $this->_dir . '/' . $key;
        }
        return $this->alias->resolve(str_replace(':', '/', $file . $this->_extension));
    }