我试图在我的 PHP 项目中使用 Neoxygen。但我收到此错误:
Class 'Neoxygen\NeoClient\ClientBuilder' not found in /var/www/html/work/api/vendor/myproj/myproj-core/src/MyProj/DatabaseTest/ManagersTest/AdminDbManagerTest.php.
我的代码:
<?php
namespace MyProj\DatabaseTest\ManagersTest;
use myProjCore\Tasks\AbstractClasses\ApiTask;
use Neoxygen\NeoClient\ClientBuilder;
class AdminDbManagerTest extends ApiTask
{
/**
* Start the running of the task
*/
public function start()
{
$this->testDB();
}
private function testDB()
{
$client = ClientBuilder::create()
->addConnection('default','http','localhost',7474)
->build();
}
}
我可以通过按ClientBuilder
(在 testDB 函数上)来访问该类所以我猜该类可以识别 ClientBuilder。