kenkataiwa / doctrine-fixtures-module
此包已被 弃用,不再维护。没有建议的替代包。
Zend Framework Doctrine Fixtures Module
dev-master / 0.1.x-dev
2018-06-12 15:40 UTC
Requires
- php: ^5.6 || ^7.0
- doctrine/data-fixtures: ^1
- doctrine/doctrine-module: >=1.2
- doctrine/doctrine-orm-module: >=1
- symfony/console: ^2.3 || ^3.0
- zendframework/zend-hydrator: ^1.1 || ^2.2.1
- zendframework/zend-mvc: ^2.7.10 || ^3.0.1
- zendframework/zend-servicemanager: ^2.7.6 || ^3.1
- zendframework/zend-stdlib: ^2.7.7 || ^3.0.1
Requires (Dev)
- doctrine/doctrine-fixtures-bundle: dev-master
This package is not auto-updated.
Last update: 2023-05-12 10:51:46 UTC
README
简介
此模块将 Doctrine Data Fixtures 库 集成到 Zend Framework 中,以便您可以通过 Doctrine ORM 或 ODM 以编程方式加载数据固定文件。
安装
此模块使用 composer 进行安装。有关 composer 文档,请参阅 getcomposer.org。
$ composer require kenkataiwa/doctrine-fixtures-module
然后打开 config/application.config.php
文件,并将 DoctrineModule
、DoctrineORMModule
和 DoctrineFixturesModule
添加到您的 modules
中。
注册固定文件
要使用 Doctrine 模块注册固定文件,请将固定文件添加到您的配置中。
<?php return array( 'doctrine' => array( 'fixtures' => array( __NAMESPACE__.'_fixture' => __DIR__ . '/../src/'.__NAMESPACE__.'/Fixture', ) ) );
用法
命令行
如下访问 Doctrine 命令行
加载
./vendor/bin/doctrine-module fixtures:load