Coder Social home page Coder Social logo

moparangodbbundle's Introduction

MopArangoDbBundle

This is a simple integration of ArangoDb (http://arangodb.org) into Symfony2

Status

This is HIGHLY experimental as is ArangoDb itself and its somewhat hackish xD

What does the integration do?

This bundle handles several things:

  1. It makes arangodb connections configurable in symfony
  2. It provides a neat DataCollector so you will see what's happening in the symfony profiler
  3. It comes with a FOSUser integration (which should be in a separate bundle but whatever)

Installation

It's a normal symfony bundle so installation should be straight forward. There is no composer integration via packagist yet due to its experimental status. You can install the bundle via composer easily nevertheless:

Step 1: Register this github repository in the repositories section of your composer.json

"repositories": [
        ...
        {
               "type":"vcs",
               "url":"https://github.com/m0ppers/MopArangoDbBundle.git"
        }
		...
   ],

Step 2: This bundle needs ArangoDB-PHP. Add both bundles to your composer.json:

 "require": {
	    ..
	    "mop/arangodbbundle" : "dev-master",
		"triagens/ArangoDb": "2.0.*",
		..
	}

ArangoDb-PHP comes with lots of documentation & examples. Check it out here:

https://github.com/triAGENS/ArangoDb-PHP

Basic Configuration

Connections

in app/config/config.yml:

mop_arango_db:
    default_connection: main # optional will be set to the first connection if not present
    connections:
        main: 
            host: 127.0.0.1
            port: 8529

Should be pretty obvious. Once configured the Bundle handles the lazy loading of the connections.

You can now access your avocado connections using the DI-Container of sf2:

$connection = $container->get('mop_arangodb.default_connection');

or

$connection = $container->get('mop_arangodb.connections.main');

FOS Userbundle integration

mop_arango_db:
    fos:
        connection: main
        collection: users

Afterwards create the collection in arangodb.

Then you will have to tell fos that it should use the arangodb driver:

fos_user:
    db_driver: custom
    user_class: Acme\DemoBundle\Entity\User
    firewall_name: main
    service:
        user_manager: mop_arangodb.fos.user_manager

moparangodbbundle's People

Contributors

m0ppers avatar luebbert42 avatar jsteemann avatar velikanov avatar vladdevops avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.