2017 © Pedro Peláez
 

library zend-doctrine-fixture

Zend Library that provides Doctrine Data-Fixture functionality

image

codeedu/zend-doctrine-fixture

Zend Library that provides Doctrine Data-Fixture functionality

  • Monday, September 26, 2016
  • by argentinaluiz
  • Repository
  • 2 Watchers
  • 0 Stars
  • 1,317 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

About

This library provides integration with Zend Framework and Doctrine Data Fixture. Also support PSR-11. It's based in zendexpr-doctrine-fixture, (*1)

Get started

Instalation
composer require codeedu/zend-doctrine-fixture:0.0.1
Registering Fixtures

To register fixtures add the fixtures in your configuration., (*2)

[
      'doctrine' => [
            'fixtures' => [
                  'MyFixtures' => __DIR__ . '/../src/Fixture',
            ]
      ]
];

Register the module in modules.config.php:, (*3)

      'CodeEdu\DoctrineFixture'

Usage

Command Line

Access the Doctrine command line as following, (*4)

Import

./vendor/bin/doctrine-module data-fixture:import

Dependency Injection with Fixtures

This library provides inject the service container in fixtures. So add interface FixtureContainerInterface, see below:, (*5)

class MyFixture implements FixtureInterface, FixtureContainerInterface
{
    private $container;

    public function load(ObjectManager $manager){
        $myService = $this->container->get(MyService::class);
    }

    public function getContainer()
    {
        return $this->container;
    }

    public function setContainer(ContainerInterface $container)
    {
        $this->container = $container;
    }
}

The Versions

26/09 2016

dev-master

9999999-dev

Zend Library that provides Doctrine Data-Fixture functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Luiz

zf2 doctrine zf3 fixture

24/09 2016

0.0.1

0.0.1.0

Zend Library that provides Doctrine Data-Fixture functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Luiz

zf2 doctrine zf3 fixture