2017 © Pedro Peláez
 

library rexster

PHP Rexster SDK

image

php-rexster/rexster

PHP Rexster SDK

  • Thursday, December 5, 2013
  • by ashwinks
  • Repository
  • 2 Watchers
  • 3 Stars
  • 204 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

PHP-Rexster

PHP SDK for the Rexster REST API, (*1)

Usage

Create a graph object, (*2)

$graph = new Graph('http://localhost:8182', 'testing');

Get a vertex from the graph by vertex id, (*3)

$vertex = $graph->getVertex($vertex_id);

Get an edge from the graph by edge id, (*4)

$edge = $graph->getEdge($edge_id);

Get a vertex by an indexed property or attribute, (*5)

$vertex = $graph->getVertexByAttribute('name', $name);

Get all vertices with offsets for paging, (*6)

$graph->setOffsetStart(5);
$graph->setOffsetEnd(10);
$vertices = $graph->getVertices();

Create a vertex, (*7)

$vertex = new Vertex($graph);
$vertex->some_property = "some property";
$vertex->another_attribute = "haay";
$vertex->create();

Create an edge, (*8)

$edge = new Edge($graph);
$e->some_property = 'edge name property';
$e->_inV = 4;
$e->_outV = 8;
$e->_label = "knows";

Create an in/out edges for a given vertex, (*9)

$vertex = $graph->getVertex($vertex_id);
$vertex->createOutEdge($to_vertex_id, 'likes', $data);
$vertex->createInEdge($from_vertex_id, 'likes', $data);

Gremlin scripts, (*10)

$gr = new Gremlin($g);
$response = $gr->runScript("g.v({$vertex_id}).out.path");

The Versions

05/12 2013

dev-master

9999999-dev https://github.com/ashwinks/PHP-Rexster

PHP Rexster SDK

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api rest api client blueprints rexster rexster graph

05/12 2013

1.0

1.0.0.0 https://github.com/ashwinks/PHP-Rexster

PHP Rexster SDK

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

api rest api client blueprints rexster rexster graph