2017 © Pedro Peláez
 

symfony-bundle arangodbbundle

Symfony2 integration for ArangoDB

image

mop/arangodbbundle

Symfony2 integration for ArangoDB

  • Tuesday, December 27, 2016
  • by m0ppers
  • Repository
  • 3 Watchers
  • 7 Stars
  • 56 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

MopArangoDbBundle

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

Status

This is HIGHLY experimental as is ArangoDb itself and its somewhat hackish xD, (*2)

What does the integration do?

This bundle handles several things:, (*3)

  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:, (*4)

Step 1: Register this github repository in the repositories section of your composer.json, (*5)

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

Step 2: This bundle needs ArangoDB-PHP. Add both bundles to your composer.json:, (*6)

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

ArangoDb-PHP comes with lots of documentation & examples. Check it out here:, (*7)

https://github.com/triAGENS/ArangoDb-PHP, (*8)

Basic Configuration

Connections

in app/config/config.yml:, (*9)

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., (*10)

You can now access your avocado connections using the DI-Container of sf2:, (*11)

$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., (*12)

Then you will have to tell fos that it should use the arangodb driver:, (*13)

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

The Versions

27/12 2016

dev-master

9999999-dev

Symfony2 integration for ArangoDB

  Sources   Download

MIT

The Requires

 

by Andreas Streichardt

02/05 2015

dev-xenji-fos-fixes

dev-xenji-fos-fixes

Symfony2 integration for ArangoDB

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Streichardt

11/04 2015

dev-xenji-remove-fos-dependencies

dev-xenji-remove-fos-dependencies

Symfony2 integration for ArangoDB

  Sources   Download

MIT

The Requires

 

by Andreas Streichardt