protected function sanitizePath($path)
    {
        Assert::stringNotEmpty($path, 'The path must be a non-empty string. Got: %s');
        Assert::startsWith($path, '/', 'The path %s is not absolute.');

        return Path::canonicalize($path);
    }
protected function sanitizePath($path)
    {
        Assert::stringNotEmpty($path, 'The path must be a non-empty string. Got: %s');
        Assert::startsWith($path, '/', 'The path %s is not absolute.');

        return Path::canonicalize($path);
    }
protected function sanitizePath ( $ path ) { Assert :: stringNotEmpty ( $ path , 'The path must be a non-empty string. Got: %s' ) ; Assert :: startsWith ( $ path , '/' , 'The path %s is not absolute.' ) ; return Path :: canonicalize ( $ path ) ; }
Sanitize a given path and check its validity.

@param string $path

@return string
Sanitize a given path and check its validity .