創建節點可以正常工作,但是當我嘗試添加標籤時,遇到以下問題。在Neo4j for PHP中調用makeLabel失敗
PHP致命錯誤:在/elixir/apps/home/bin/elixir_classes/class.StorageController.php調用未定義的方法普通人\ Neo4j的\客戶:: makeLabel()上線208
我在做什麼這裏錯了嗎?
感謝,
-Edwin
這是相關代碼的片段
<?php
use Everyman\Neo4j\Client,
Everyman\Neo4j\Transport,
Everyman\Neo4j\Node,
Everyman\Neo4j\Relationship;
.
.
$neo4jclient = new Client(new Transport('durq2idb10-tst.corp.xyz.com', 7474));
// Create nodes
$controller = new Node($neo4jclient);
$controller->setProperty('serialnumber', "$this->serialnumber")->save();
$controller->setProperty('system_id', "$this->system_id")->save();
$controller->setProperty('hostname', "$this->hostname")->save();
$controller_label=$neo4jclient->makeLabel('Storage Controller');
$controller->addLabels($controller_label)->save();
你如何包括neo4jphp?你正在使用PHAR文件,作曲家還是克隆回購? –