2017 © Pedro Peláez
 

library nette-doctrine

A lightweight Doctrine integration extension for Nette framework.

image

dtforce/nette-doctrine

A lightweight Doctrine integration extension for Nette framework.

  • Thursday, August 24, 2017
  • by maresja1
  • Repository
  • 4 Watchers
  • 3 Stars
  • 694 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Scrutinizer Code Quality, (*1)

nette-doctrine

A lightweight Doctrine integration extension for Nette framework. This extension is a replacement of Kdyby\Doctrine, suitable for those who want to use native Doctrine classes and don't want register entity manager in the Nette service container themselves. It is compatible with Kdyby\Console., (*2)

Configuration

Add extension to Nette project like this:, (*3)

extensions:
    doctrine: DTForce\DoctrineExtension\DI\DoctrineExtension

Configure Doctrine access and other parameters like this:, (*4)

doctrine:
    connection:
        driver: pdo_pgsql
        host: localhost
        port: 5432
        user: username
        password: password
        dbname: database

    debug: true
    prefix: doctrine.default
    proxyDir: %tempDir%/cache/proxies
    sourceDir: %appDir%/Entity

    dbal:
        types:
            dateinterval: App\Doctrine\Postgresql\Types\DateIntervalType
        type_overrides:
            date: VasekPurchart\Doctrine\Type\DateTimeImmutable\DateTimeImmutableType
            datetime: VasekPurchart\Doctrine\Type\DateTimeImmutable\DateTimeImmutableType
            datetimetz: VasekPurchart\Doctrine\Type\DateTimeImmutable\DateTimeTzImmutableType
        schema_filter: "~^(?!nd_)~" # tables and sequences that start with nd_ are ingored by Doctrine

    functions:
        CAST: App\Doctrine\Postgresql\Functions\Cast

Tweaking

Mapping classes

To create mapping between classes used in annotations and the actually instantiated classes create a Nette extension implementing IClassMappingProvider. Method getClassnameToClassnameMapping is expected to return mapping using class used for annotations as its key and class actually instantiated as the associated value., (*5)

Adding entity source directories

To register different source directories for different extensions, let your extension implement IEntitySourceProvider. Method getEntityFolderMappings is expected to return list of folders, where Doctrine entities can be found. Key of the returned array is ignored., (*6)

The Versions

24/08 2017

dev-master

9999999-dev

A lightweight Doctrine integration extension for Nette framework.

  Sources   Download

LGPL-2.1

The Requires

 

05/12 2016

v1.0.0

1.0.0.0

A lightweight Doctrine integration extension for Nette framework.

  Sources   Download

LGPL-2.1

The Requires

 

19/05 2016

v0.2.1

0.2.1.0

A lightweight Doctrine integration extension for Nette framework.

  Sources   Download

LGPL-2.1

The Requires

 

23/11 2015

v0.1.7-rc

0.1.7.0-RC

A lightweight Doctrine integration extension for Nette framework.

  Sources   Download

LGPL-2.1

The Requires

 

23/11 2015

v0.2.0

0.2.0.0

A lightweight Doctrine integration extension for Nette framework.

  Sources   Download

LGPL-2.1

The Requires

 

23/11 2015

v0.1.6-rc

0.1.6.0-RC

  Sources   Download

LGPL-2.1

The Requires

 

22/11 2015

v0.1.5-beta

0.1.5.0-beta

  Sources   Download

LGPL-2.1

The Requires

 

22/11 2015

v0.1.4-beta

0.1.4.0-beta

  Sources   Download

LGPL-2.1

The Requires

 

22/11 2015

v0.1.3-beta

0.1.3.0-beta

  Sources   Download

LGPL-2.1

The Requires