protected function _buildPath($record, $extension = true, $hash = null) {
		if ($this->_config['pathBuilderOptions']['preserveFilename'] === true) {
			if (!empty($hash)) {
				$path = $record['path'] . preg_replace('/\.[^.]*$/', '', $record['filename']) . '.' . $hash . '.' . $record['extension'];
			} else {
				$path = $record['path'] . $record['filename'];
			}
		} else {
			$path = $record['path'] . str_replace('-', '', $record['id']);
			if (!empty($hash)) {
				$path .= '.' . $hash;
			}
			if ($extension === true) {
				$path .= '.' . $record['extension'];
			}
		}

		if ($this->adapterClass === 'AmazonS3' || $this->adapterClass === 'AwsS3') {
			return str_replace('\\', '/', $path);
		}

		return $path;
	}
protected function _buildPath($record, $extension = true, $hash = null) {
		if ($this->_config['pathBuilderOptions']['preserveFilename'] === true) {
			if (!empty($hash)) {
				$path = $record['path'] . preg_replace('/\.[^.]*$/', '', $record['filename']) . '.' . $hash . '.' . $record['extension'];
			} else {
				$path = $record['path'] . $record['filename'];
			}
		} else {
			$path = $record['path'] . str_replace('-', '', $record['id']);
			if (!empty($hash)) {
				$path .= '.' . $hash;
			}
			if ($extension === true) {
				$path .= '.' . $record['extension'];
			}
		}

		if ($this->adapterClass === 'AmazonS3' || $this->adapterClass === 'AwsS3') {
			return str_replace('\\', '/', $path);
		}

		return $path;
	}
protected function _buildPath ( $ record , $ extension = true , $ hash = null ) { if ( $ this -> _config [ 'pathBuilderOptions' ] [ 'preserveFilename' ] === true ) { if ( ! empty ( $ hash ) ) { $ path = $ record [ 'path' ] . preg_replace ( '/\.[^.]*$/' , '' , $ record [ 'filename' ] ) . '.' . $ hash . '.' . $ record [ 'extension' ] ; } else { $ path = $ record [ 'path' ] . $ record [ 'filename' ] ; } } else { $ path = $ record [ 'path' ] . str_replace ( '-' , '' , $ record [ 'id' ] ) ; if ( ! empty ( $ hash ) ) { $ path .= '.' . $ hash ; } if ( $ extension === true ) { $ path .= '.' . $ record [ 'extension' ] ; } } if ( $ this -> adapterClass === 'AmazonS3' || $ this -> adapterClass === 'AwsS3' ) { return str_replace ( '\\' , '/' , $ path ) ; } return $ path ; }
Builds a path to a file

@param array $record
@param bool $extension
@param string $hash
@return string
Builds a path to a file