dtforce/nette-doctrine 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dtforce/nette-doctrine

Composer 安装命令:

composer require dtforce/nette-doctrine

包简介

A lightweight Doctrine integration extension for Nette framework.

README 文档

README

Scrutinizer Code Quality

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.

Configuration

Add extension to Nette project like this:

extensions:
	doctrine: DTForce\DoctrineExtension\DI\DoctrineExtension

Configure Doctrine access and other parameters like this:

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.

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.

统计信息

  • 总下载量: 711
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-2.1
  • 更新时间: 2015-11-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固