Skip to content

zeng-qinghui/phpneo4j

Repository files navigation

phpneo4j

Index

neo4j
neo4j::__construct
neo4j::createNode
neo4j::getNode
neo4j::deleteNode
neo4j::createRelationship
neo4j::getRelationship
neo4j::deleteRelationship
neo4j::getPath
neo4j::getPaths
neo4j::getNodeIndex
neo4j::deleteNodeIndex
neo4j::getRelationshipIndex
neo4j::deleteRelationshipIndex
neo4j::cypher
neo4j::query
neo4j::restAPI
neo4jNode
neo4jNode::getId
neo4jNode::getUri
neo4jNode::save
neo4jNode::delete
neo4jNode::getProperty
neo4jNode::getAllProperties
neo4jNode::setProperty
neo4jNode::setAllProperties
neo4jNode::deleteProperty
neo4jNode::getRelationships
neo4jNode::getPathTo
neo4jNode::getPathFrom
neo4jNode::getPathsTo
neo4jNode::getPathsFrom
neo4jNode::traverseNodes
neo4jNode::traversePaths
neo4jNode::traverseRelationships
neo4jRelationship
neo4jRelationship::getId
neo4jRelationship::getUri
neo4jRelationship::save
neo4jRelationship::delete
neo4jRelationship::getProperty
neo4jRelationship::getAllProperties
neo4jRelationship::setProperty
neo4jRelationship::setAllProperties
neo4jRelationship::deleteProperty
neo4jRelationship::startNode
neo4jRelationship::endNode
neo4jRelationship::getType
neo4jIndex
neo4jIndex::getId
neo4jIndex::get
neo4jIndex::getOrCreate
neo4jIndex::add
neo4jIndex::remove
neo4jIndex::delete
neo4jPath
neo4jPath::startNode
neo4jPath::endNode
neo4jPath::getLength
neo4jPath::getNodes
neo4jPath::getRelationships

neo4j

neo4j::__construct
neo4j::createNode
neo4j::getNode
neo4j::deleteNode
neo4j::createRelationship
neo4j::getRelationship
neo4j::deleteRelationship
neo4j::getPath
neo4j::getPaths
neo4j::getNodeIndex
neo4j::deleteNodeIndex
neo4j::getRelationshipIndex
neo4j::deleteRelationshipIndex
neo4j::cypher
neo4j::query
neo4j::restAPI

neo4j::__construct

public neo4j::__construct([string $host="localhost" [,int $port=7474 [,string $userpsw=""]]])

Create a new neo4j connection object

userpsw
username:password

neo4j::createNode

public neo4jNode neo4j::createNode([array $properties=array()])

Create a neo4jNode

neo4j::getNode

public neo4jNode neo4j::getNode(string $id)

Get a neo4jNode by nodeId

neo4j::deleteNode

public neo4j::deleteNode(string $id)

Delete a neo4jNode by nodeId

neo4j::createRelationship

public neo4jRelationship neo4j::createRelationship(mixed $start, mixed $to [,string $type="" [,array $properties=array()]])

Create a neo4jRelationship

$start and $to can be nodeId or neo4jNode object.

neo4j::getRelationship

public neo4jRelationship neo4j::getRelationship(string $id)

Get a neo4jRelationship by relationshipId

neo4j::deleteRelationship

public neo4j::deleteRelationship(string $id)

Delete a neo4jRelationship by relationshipId

neo4j::getPath

public neo4jPath neo4j::getPath(mixed $start, mixed $to, string $type, int $algorithm [, array $option])

Get a neo4jPath by conditions

$algorithm
NEO4J_PATH_SHORTESTPATH
NEO4J_PATH_ALLSIMPLEPATHS
NEO4J_PATH_ALLPATHS
NEO4J_PATH_DIJKSTRA
$option - An array of options to applay
max_depth
cost_property - only use for NEO4J_PATH_DIJKSTRA

neo4j::getPaths

public neo4jPath neo4j::getPaths(mixed $start, mixed $to, string $type, int $algorithm [, array $option])

Get all neo4jPathes by conditions

$algorithm
NEO4J_PATH_SHORTESTPATH
NEO4J_PATH_ALLSIMPLEPATHS
NEO4J_PATH_ALLPATHS
NEO4J_PATH_DIJKSTRA
$option - An array of options to applay
max_depth
cost_property - only use for NEO4J_PATH_DIJKSTRA

neo4j::getNodeIndex

public neo4jIndex neo4j::getNodeIndex(string $id)

Get a neo4jIndex of neo4jNode by indexId

neo4j::deleteNodeIndex

public neo4j::deleteNodeIndex(string $id)

Delete a neo4jIndex of neo4jNode by indexId

neo4j::getRelationshipIndex

public neo4jIndex neo4j::getRelationshipIndex(string $id)

Get a neo4jIndex of neo4jRelationship by indexId

neo4j::deleteRelationshipIndex

public neo4j::deleteRelationshipIndex(string $id)

Delete a neo4jIndex of neo4jRelationship by indexId

neo4j::cypher

public array neo4j::cypher(string $query [, array $params = array()])

Query with cypher

neo4j::query

public array neo4j::query(string $query)

Find node by query from an automatic index

neo4j::restAPI

public array neo4j::restAPI(int $method, string $path [,array $data])

Send a request by restAPI

$method
REST_METHOD_GET
REST_METHOD_POST
REST_METHOD_DELETE
REST_METHOD_PUT

neo4jNode

neo4jNode::getId
neo4jNode::getUri
neo4jNode::save
neo4jNode::delete
neo4jNode::getProperty
neo4jNode::getAllProperties
neo4jNode::setProperty
neo4jNode::setAllProperties
neo4jNode::deleteProperty
neo4jNode::getRelationships
neo4jNode::getPathTo
neo4jNode::getPathFrom
neo4jNode::getPathsTo
neo4jNode::getPathsFrom
neo4jNode::traverseNodes
neo4jNode::traversePaths
neo4jNode::traverseRelationships

neo4jNode::getId

public string neo4jNode::getId()

Get nodeId

neo4jNode::getUri

public string neo4jNode::getUri()

Get uri

neo4jNode::save

public neo4jNode neo4jNode::save()

Save self

neo4jNode::delete

public neo4jNode::delete()

Delete self

neo4jNode::getProperty

public mix neo4jNode::getProperty(string $key)

Get a property by key

neo4jNode::getAllproperties

public array neo4jNode::getAllProperties()

Get all properties

neo4jNode::setProperty

public neo4jNode neo4jNode::setProperty(string $key,mix $value)

Set a property

neo4jNode::setAllProperties

public neo4jNode neo4jNode::setAllProperties(array $properties)

Set all properties

neo4jNode::deleteProperty

public neo4jNode neo4jNode::deleteProperty(string $key)

Delete a property

neo4jNode::getRelationships

public array neo4jNode::getRelationships([int $direct = NEO4J_RELATIONSHIP_ALL [, array $typeList = array()]])

Get all relationships

$direct
NEO4J_RELATIONSHIP_IN
NEO4J_RELATIONSHIP_OUT
NEO4J_RELATIONSHIP_ALL

neo4jNode::getPathTo

public neo4jPath neo4jNode::getPathTo(mixed $to, string $type, int $algorithm [, array $option])

Get a neo4jPath by conditions

$algorithm
NEO4J_PATH_SHORTESTPATH
NEO4J_PATH_ALLSIMPLEPATHS
NEO4J_PATH_ALLPATHS
NEO4J_PATH_DIJKSTRA
$option - An array of options to applay
max_depth
cost_property - only use for NEO4J_PATH_DIJKSTRA

neo4jNode::getPathFrom

public neo4jPath neo4jNode::getPathFrom(mixed $start, string $type, int $algorithm [, array $option])

Get a neo4jPath by conditions

$algorithm
NEO4J_PATH_SHORTESTPATH
NEO4J_PATH_ALLSIMPLEPATHS
NEO4J_PATH_ALLPATHS
NEO4J_PATH_DIJKSTRA
$option - An array of options to applay
max_depth
cost_property - only use for NEO4J_PATH_DIJKSTRA

neo4jNode::getPathsTo

public neo4jPath neo4jNode::getPathsTo(mixed $to, string $type, int $algorithm [, array $option])

Get all neo4jPathes by conditions

$algorithm
NEO4J_PATH_SHORTESTPATH
NEO4J_PATH_ALLSIMPLEPATHS
NEO4J_PATH_ALLPATHS
NEO4J_PATH_DIJKSTRA
$option - An array of options to applay
max_depth
cost_property - only use for NEO4J_PATH_DIJKSTRA

neo4jNode::getPathsFrom

public neo4jPath neo4jNode::getPathsFrom(mixed $start, string $type, int $algorithm [, array $option])

Get all neo4jPathes by conditions

$algorithm
NEO4J_PATH_SHORTESTPATH
NEO4J_PATH_ALLSIMPLEPATHS
NEO4J_PATH_ALLPATHS
NEO4J_PATH_DIJKSTRA
$option - An array of options to applay
max_depth
cost_property - only use for NEO4J_PATH_DIJKSTRA

neo4jNode::traverseNodes

public array neo4jNode::traverseNodes(array $option)

Traverse nodes

$option
order - [ breadth_first | depth_first ]
relationships - [ all | in | out ]
uniqueness - [ node_global | none | relationship_global | node_path | relationship_path ]
return_filter - [ all | all_but_start_node ]
prune_evaluator
max_depth

neo4jNode::traversePaths

public array neo4jNode::traversePaths(array $option)

Traverse paths

$option
order - [ breadth_first | depth_first ]
relationships - [ all | in | out ]
uniqueness - [ node_global | none | relationship_global | node_path | relationship_path ]
return_filter - [ all | all_but_start_node ]
prune_evaluator
max_depth

neo4jNode::traverseRelationships

public array neo4jNode::traverseRelationships(array $option)

Traverse relationships

$option
order - [ breadth_first | depth_first ]
relationships - [ all | in | out ]
uniqueness - [ node_global | none | relationship_global | node_path | relationship_path ]
return_filter - [ all | all_but_start_node ]
prune_evaluator
max_depth

neo4jRelationship

neo4jRelationship::getId
neo4jRelationship::getUri
neo4jRelationship::save
neo4jRelationship::delete
neo4jRelationship::getProperty
neo4jRelationship::getAllProperties
neo4jRelationship::setProperty
neo4jRelationship::setAllProperties
neo4jRelationship::deleteProperty
neo4jRelationship::startNode
neo4jRelationship::endNode
neo4jRelationship::getType

neo4jRelationship::getId

public string neo4jRelationship::getId()

Get relationshipId

neo4jRelationship::getUri

public string neo4jRelationship::getUri()

Get uri

neo4jRelationship::save

public neo4jRelationship neo4jRelationship::save()

Save self

neo4jRelationship::delete

public neo4jRelationship::delete()

Delete self

neo4jRelationship::getProperty

public mix neo4jRelationship::getProperty(string $key)

Get a property by key

neo4jRelationship::getAllProperties

public array neo4jRelationship::getAllProperties()

Get all properties

neo4jRelationship::setProperty

public neo4jRelationship neo4jRelationship::setProperty(string $key,mix $value)

Set a property

neo4jRelationship::setAllProperties

public neo4jRelationship neo4jRelationship::setAllProperties(array $properties)

Set all properties

neo4jRelationship::deleteProperty

public neo4jRelationship neo4jRelationship::deleteProperty(string $key)

Delete a property

neo4jRelationship::startNode

public neo4jNode neo4jRelationship::startNode()

Get start node

neo4jRelationship::endNode

public neo4jNode neo4jRelationship::endNode()

Get end node

neo4jRelationship::getType

public string neo4jRelationship::getType()

Get type

neo4jIndex

neo4jIndex::getId
neo4jIndex::get
neo4jIndex::getOrCreate
neo4jIndex::add
neo4jIndex::remove
neo4jIndex::delete

neo4jIndex::getId

public string neo4jIndex::getId()

Get indexId

neo4jIndex::get

public mix neo4jIndex::get(string $key, string $value)

Get objects by $key and $value

neo4jIndex::getOrCreate

public mix neo4jIndex::getOrCreate(mixed $obj, string $key, string $value)

Get or create an object by $key and $value

neo4jIndex::add

public neo4jIndex neo4jIndex::add(mixed $obj, string $key, string $value)

Add an object to the index

neo4jIndex::remove

public neo4jIndex neo4jIndex::remove(mixed $obj, string $key, string $value)

Remove an object from the index

neo4jIndex::delete

public neo4jIndex::delete()

Delete self

neo4jPath

neo4jPath::startNode
neo4jPath::endNode
neo4jPath::getLength
neo4jPath::getNodes
neo4jPath::getRelationships

neo4jPath::startNode

public neo4jNode neo4jPath::startNode()

Get start node

neo4jPath::endNode

public neo4jNode neo4jPath::endNode()

Get end node

neo4jPath::getLength

public int neo4jPath::getLength()

Get length

neo4jPath::getNodes

public array neo4jPath::getNodes()

Get all nodes

neo4jPath::getRelationships

public array neo4jPath::getRelationships()

Get all relationships

About

php extension of neo4j

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published