/** * Set the host and port of the endpoint * * @param string $host * @param integer $port */ public function __construct($host = 'localhost', $port = 7474) { $this->host = $host; $this->port = $port; if (DI::isRegistered("dbPath")) { $this->path = DI::resolve("dbPath"); } }
public function testExceptionForUnexistingEntry() { $this->setExpectedException('Everyman\\Neo4j\\Exception'); DI::resolve("unexistingEntry"); }
/** * Create a new relationship object bound to this client * * @param array $properties * @return Relationship */ public function makeRelationship($properties = array()) { $rel = DI::resolve("Relationship", array($this, $properties)); if (!$rel instanceof Relationship) { throw new Exception('Relationship factory did not return a Relationship object.'); } return $rel->setProperties($properties); }