2017 © Pedro Peláez
 

yii-extension yii2-doctrine

Yii 2 extension wrapper to communicate with Doctrine 2.

image

svp/yii2-doctrine

Yii 2 extension wrapper to communicate with Doctrine 2.

  • Thursday, March 16, 2017
  • by svp123
  • Repository
  • 2 Watchers
  • 5 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 1 Versions
  • 21 % Grown

The README.md

yii2-doctrine

Yii 2 extension wrapper to communicate with Doctrine 2., (*1)

Installation

You can add this library as a local, per-project dependency to your project using Composer:, (*2)

composer require svp/yii2-doctrine

Usage

For connecting doctrine components insert in you config file php 'components' => [ ... 'doctrine' => [ 'class' => 'yii\doctrine\components\DoctrineComponent', 'isDev' => true, //for development 'driver' => 'pdo_mysql', //database driver 'user' => 'user', //database user 'password' => 'password', //password 'host' => 'localhost', 'dbname' => 'dbname', //name database 'entityPath' => [ //paths with you entity 'backend/models', 'frontend/models', 'console/models', 'common/models', ] ] ], (*3)

For using doctrine console add to you config file, (*4)

'controllerMap' => [
        ....
        'doctrine' => [
            'class'     => 'yii\doctrine\console\DoctrineController',
        ]
    ]
]

and call ./yii doctrine, if you need transfer option use option -o=option.
For example :
--create table from entity ./yii orm:schema-tool:create
--update table from entity ./yii orm:schema-tool:update -o=--force
--create table from entity ./yii orm:schema-tool:drop -o=--dump-sql etc., (*5)

The Versions

16/03 2017

dev-master

9999999-dev https://github.com/Seldaek/monolog

Yii 2 extension wrapper to communicate with Doctrine 2.

  Sources   Download

The Requires

 

by Vitaliy Skvortsov

doctrine yii