spider/spider

Simple and flexible graph database abstraction.

v0.3.2 2015-10-08 18:05 UTC

README

This project and organization are abandond. If you want to take this over or want github username, open an issue.

Managed with ZenHub! Join the chat at https://gitter.im/spider/spider Latest Version Software License Build Status Coverage Status Scrutinizer Code Quality Total Downloads

SensioLabsInsight

A simple, flexible, and beautiful graph-data abstraction for php.

Why "Spider?" Because spiders crawl over webs, and webs look like graphs. Walk your data.

This readme is very limited. See the full documentation for a guidebook.

Current Version

Spider is still under active development. All releases are well-tested and stable, though maybe not ready for production yet. The current version is v0.3.0 - which includes a basic command builder, connections, and drivers. For a roadmap see the full documentation. Please use spider anywhere you can and open issues around bugs or edge cases.

Goals

  • Framework agnostic, community-driven with best practices.
  • Made specifically for highly-relational data.
  • An easy transition from SQL or Mongo.
  • Simple, fluent, and consistent API.
  • Simple drivers to connect to specific graph databases or other datastores.
  • Extensible and configurable.

Current Features

Upcoming Features

  • Fluent traversals through the query and command builder.
  • Database agnostic Schema Builder.
  • Simple yet powerful Models and Object Graph Mappers
  • Graph data utilities (algorithms, etc.).
  • SSL support, data-binding, filters, validation, caching, logging, and more.
  • Extensible so you can use your own loggers, cachers, etc.

Setup and Basic Usage

Install via Composer

$ composer require spider/spider

The master branch contains stable code, though not necessarily ready for production. The develop branch is a step ahead and may me unstable right now.

The simplest thing to do from there is use the query builder

$connection = new Connection([
    'driver' => 'neo4j'
    'hostname' => 'localhost'
    'port' => 7474,
    'username' => 'root',
    'password' => 'root'
]);

$query = new Spider\Commands\Query($connection);

$characters = $query
    ->select('name, position, catch_phrase')
    ->from('characters')
    ->where('show', 'Firefly')
    ->orderBy('name')
    ->all();
    
foreach ($characters as $character) {
    $character->name; // Wash
    $character->position; // Pilot
    $character->catch_phrase; // "I am a leaf on the wind."
}

Of course, there's a lot more you can do. Check out the full documentation.

Inspired By

Contributing

Contributions are welcome and will be fully credited. Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email spiderogm@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.