我在php类中上传文件时遇到问题: 上传文件后,我就通过php-cmis-client库在Alfresco中创建了一个新文档。但是,在实例化库客户端之前,我得到“不允许在..中关闭的序列化”的类型,我报告了引发异常的代码:
$this->alfrescoHttpInvoker = new \GuzzleHttp\Client(
['auth' =>
[
CMIS_BROWSER_USER,
CMIS_BROWSER_PASSWORD
]
]);
class Client implements ClientInterface{
private $config;
public function __construct(array $config = []) {
if (!isset($config['handler'])) {
$config['handler'] = HandlerStack::create();
} elseif (!is_callable($config['handler'])) {
throw new \InvalidArgumentException('handler must be a callable');
}
// Convert the base_uri to a UriInterface
if (isset($config['base_uri'])) {
$config['base_uri'] = Psr7\uri_for($config['base_uri']);
}
$this->configureDefaults($config);
}...}
如何更改客户端类以免引发异常?