public function applyPathPrefix($path)
    {
        $path = ltrim($path, '/');
        if (strlen($path) === 0) {
            return rtrim($this->getPathPrefix(), '/');
        }

        return $this->getPathPrefix() . $path;
    }