Jackalope\Transport\Jackrabbit\Client::encodeAndValidatePathForDavex PHP Method

encodeAndValidatePathForDavex() protected method

This is to be used in the Davex headers. The XML requests can cope with unencoded stuff
protected encodeAndValidatePathForDavex ( string $path ) : string
$path string to check
return string the cleaned path
    protected function encodeAndValidatePathForDavex($path)
    {
        PathHelper::assertValidAbsolutePath($path);
        $path = rawurlencode($path);
        // we encoded the whole path, need to rebuild slashes and parenthesis
        // this will not collide with %2F as % was encoded by rawurlencode
        $path = str_replace(array('%2F', '%5B', '%5D'), array('/', '[', ']'), $path);
        return $path;
    }