neoxygen / neo4j-neoclient

Simple PHP HttpClient for the Neo4j ReST API with Multi DB Support
MIT License
121 stars 138 forks source link

Issue with custom command #49

Closed markharding closed 8 years ago

markharding commented 9 years ago

I am trying to create a custom command to do a simple POST Rest command based on the documentation.

I am able to register and call the alias fine.

$this->neo4j = NeoClient\ClientBuilder::create()
                    ->addConnection('default','http', 'localhost',7474, true, 'neo4j', 'neo4j')
                    ->registerCommand('geomlink', 'Minds\Core\Data\Neo4j\Commands\GeomLink')
                    ->setAutoFormatResponse(true)
                    ->setDefaultTimeout(20)
                    ->build();

I then get a fatal error when I run the invoke command

$this->neo4j->invoke($command);

error: Call to a member function buildRequest() on a non-object

Any ideas?

markharding commented 9 years ago

I wrote an extension and that seems to have solved it. Perhaps favour this in documentation?

ikwattro commented 9 years ago

Thanks for the feedback, I will look into it.

Good point to favor extensions. :+1:

ikwattro commented 9 years ago

Any chance you'll be present at GraphConnect?

markharding commented 9 years ago

Not this year.. hopefully next though

ikwattro commented 9 years ago

Ok . Please don't hesitate to come with feedback on NeoClient to me

ikwattro commented 8 years ago

Closing this one, as Neoclient is moved to GraphAware and the CommandPattern has completely been removed.