简体   繁体   English

HelloSign捆绑软件在Symfony中不起作用

[英]HelloSign bundle not working in Symfony

I have installed the Hello Sign PHP SDK in a Symfony project and it does not work and requesting to add a "use" statement which I added and still not working. 我已经在Symfony项目中安装了Hello Sign PHP SDK,它无法正常工作,并要求添加一个我添加但仍然无法正常工作的“ use”语句。 ( https://github.com/HelloFax/hellosign-php-sdk ) https://github.com/HelloFax/hellosign-php-sdk

This is the error I get when I used SDK 这是我使用SDK时遇到的错误

Attempted to load class "Client" from namespace "AppBundle\\Controller\\HelloSign". 尝试从名称空间“ AppBundle \\ Controller \\ HelloSign”中加载类“ Client”。 Did you forget a "use" statement for eg "HelloSign\\Client", "Symfony\\Component\\BrowserKit\\Client", "Symfony\\Component\\HttpKernel\\Client", "Symfony\\Bundle\\FrameworkBundle\\Client" or "GuzzleHttp\\Client" 您是否忘记了“ HelloSign \\ Client”,“ Symfony \\ Component \\ BrowserKit \\ Client”,“ Symfony \\ Component \\ HttpKernel \\ Client”,“ Symfony \\ Bundle \\ FrameworkBundle \\ Client”或“ GuzzleHttp \\ Client”的“使用”语句”

Then I used a PHP wrapper for Hello Sign called "bukashk0zzz/hellosign-bundle". 然后,我为Hello Sign使用了一个PHP包装器,名为“ bukashk0zzz / hellosign-bundle”。 And that too is requesting to add a "use" statement which I added but not working. 这也要求添加我添加但不起作用的“ use”语句。 ( https://github.com/Bukashk0zzz/HelloSignBundle ) https://github.com/Bukashk0zzz/H​​elloSignBundle

Here's that error. 这就是错误。

Attempted to load class "TemplateSignatureRequest" from namespace "AppBundle\\Controller\\HelloSign". 尝试从命名空间“ AppBundle \\ Controller \\ HelloSign”中加载类“ TemplateSignatureRequest”。 Did you forget a "use" statement for "HelloSign\\TemplateSignatureRequest"? 您是否忘记了“ HelloSign \\ TemplateSignatureRequest”的“使用”语句?

My code is 我的代码是

require_once('../vendor/hellosign/hellosign-php-sdk/vendor/autoload.php');
$client = new HelloSign\Client('apikey');
$account = $client->getAccount();

How can I fix this? 我怎样才能解决这个问题?

Did you try: 你试过了吗:

$client = new \HelloSign\Client('apikey');
$account = $client->getAccount();

if hellosign-php-sdk is installed with composer 如果hellosign-php-sdk与composer一起安装

Hellosign has API developer support at apisupport@hellosign.com if you have any other questions. 如果您还有其他疑问,Hellosign可以通过apisupport@hellosign.com提供API开发人员支持。 Please feel free to reach out there as well. 请随时与我们联系。 Sounds like you got your answer though. 听起来你虽然得到了答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM