2017 © Pedro Peláez
 

symfony-bundle neo4j-fixtures-bundle

Allow to load Neo4j data fixtures into your Symfony application

image

pandawan-technology/neo4j-fixtures-bundle

Allow to load Neo4j data fixtures into your Symfony application

  • Tuesday, May 10, 2016
  • by xavismeh
  • Repository
  • 2 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

PandawanTechnology Neo4j Fixtures Bundle

Symfony bundle to allow fixtures loading into your Neo4j graph database, (*1)

Installation

Add the bundle as a requirement:, (*2)

composer require pandawan-technology/neo4j-fixtures-bundle

Enable it in your app/AppKernel.php file:, (*3)

<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ... my bundles
            new PandawanTechnology\Neo4jFixturesBundle\PandawanTechnologyNeo4jFixturesBundle(),
        ];

        return $bundles;
    }
}

Usage

Basic

By default, the bundle will search for the DataFixtures/Neo4j directories within your registered bundles. These files must implements the PandawanTechnology\Neo4jDataFixtures\Neo4jFixtureInterface but extending PandawanTechnology\Neo4jDataFixtures\AbstractNeo4jFixture class is recommended:, (*4)

<?php
// src/AppBundle/DataFixtures/Neo4j/LoadUserData.php
namespace AppBundle\DataFixtures\Neo4j;

use GraphAware\Common\Connection\ConnectionInterface;
use PandawanTechnology\Neo4jDataFixtures\AbstractNeo4jFixture;

class LoadUserData extends AbstractNeo4jFixture
{
    /**
     * @inheritDoc
     */
    public function load(ConnectionInterface $connection)
    {
        // ... statements here
    }
}

See Pandawan Technology Neo4j Data Fixtures' library documentation for more informations., (*5)

Advanced

If you need to use third party services from your container, you can implements the ContainerAwareInterface:, (*6)

<?php
// src/AppBundle/DataFixtures/Neo4j/LoadUserData.php
namespace AppBundle\DataFixtures\Neo4j;

use GraphAware\Common\Connection\ConnectionInterface;
use PandawanTechnology\Neo4jDataFixtures\AbstractNeo4jFixture;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

class LoadUserData extends AbstractNeo4jFixture implements ContainerAwareInterface
{
    private $container;

    /**
     * @inheritDoc
     */
    public function setContainer(ContainerInterface $container = null)
    {
        $this->container = $container;
    }

    /**
     * @inheritDoc
     */
    public function load(ConnectionInterface $connection)
    {
        // ... statements here
    }
}

For more informations, you can have a look into the Pandawan Technology Neo4j DataFixtures library README file., (*7)

The Versions

10/05 2016

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/PandawanTechnology/Neo4jFixturesBundle

Allow to load Neo4j data fixtures into your Symfony application

  Sources   Download

MIT

The Requires

 

The Development Requires

database symfony fixtures data graph neo4j

10/05 2016

dev-master

9999999-dev https://github.com/PandawanTechnology/Neo4jFixturesBundle

Allow to load Neo4j data fixtures into your Symfony application

  Sources   Download

MIT

The Requires

 

The Development Requires

database symfony fixtures data graph neo4j

08/05 2016

dev-develop

dev-develop https://github.com/PandawanTechnology/Neo4jFixturesBundle

Allow to load Neo4j data fixtures into your Symfony application

  Sources   Download

MIT

The Requires

 

The Development Requires

database symfony fixtures data graph neo4j