2017 © Pedro Peláez
 

library doctrine-dynamic-zf

Zend Framework binding for doctrine-dynamic

image

fabiang/doctrine-dynamic-zf

Zend Framework binding for doctrine-dynamic

  • Thursday, April 26, 2018
  • by fabiang
  • Repository
  • 1 Watchers
  • 0 Stars
  • 105 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

fabiang/doctrine-dynamic-zf

Zend Framework 2/3 binding for fabiang/doctrine-dynamic., (*1)

Latest Stable Version License Dependency Status Build Status Scrutinizer Code Quality Code Coverage, (*2)

Requirements

This module works with Zend Framework 2 and 3, but zendframework/zend-servicemanager must be at least at version 2.7.6., (*3)

Please see the composer.json file for all other packages required., (*4)

Installation

New to Composer? Read the introduction. Run the following Composer command:, (*5)

$ composer require fabiang/doctrine-dynamic-zf

Configuration

Load the module by adding it to config/application.config.php:, (*6)

return [
    'modules' => [
        /** **/
        'Fabiang\DoctrineDynamic',
    ],
];

Configure extra options and associations into your module configuration (e.g. config/module.config.php):, (*7)

<?php

namespace Mymodule;

return [
    /** **/
    'doctrine_dynamic' => [
        \Mymodule\Entity\Customer::class => [
            'options' => [
                'repository' => \Mymodule\Repository\CustomerRepository::class,
            ],
            'fields' => [
                'fieldname' => [
                    'products' => [
                        'oneToMany' => [
                            [
                                'targetEntity' => \Mymodule\Entity\Customer::class,
                                'mappedBy'     => 'customer',
                            ]
                        ]
                    ]
                ]
            ]
        ],
        \Mymodule\Entity\Products::class => [
            'fields' => [
                'customer' => [
                    'manyToOne' => [
                        [
                            'targetEntity' => \Mymodule\Entity\Products::class,
                            'inversedBy'   => 'products',
                            'joinColumns'  => [
                                'name'                 => 'customer_id',
                                'referencedColumnName' => 'id'
                            ]
                        ]
                    ]
                ]
            ]
        ],
    ]
];

Development

This library is tested with PHPUnit., (*8)

Fork the project on Github and send an pull request with your changes. Make sure you didn't break anything with running the following commands:, (*9)

composer install
./vendor/bin/phpunit

License

BSD-2-Clause. See the LICENSE.md., (*10)

The Versions

26/04 2018

dev-doctrine-module-2

dev-doctrine-module-2

Zend Framework binding for doctrine-dynamic

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

zf2 doctrine module zend-framework zf2-module zf3-module