cleentfaar/doctrine-table-prefix-bundle

此包已被弃用,不再维护。没有建议的替代包。

此包允许doctrine识别您在表名中使用的任何前缀(例如acme_)

1.0.0 2013-12-05 23:21 UTC

This package is auto-updated.

Last update: 2019-02-21 09:19:31 UTC


README

Latest Stable Version Scrutinizer Quality Score Code Coverage Build Status Total Downloads

这是什么?

此包允许doctrine识别您在表名中使用的任何前缀(例如acme_)。它是GrifiS原始包的更新和修订版本,原始包存在许多兼容性问题,并遗漏了一些我自己的项目所需的关键功能。

安装

1) 使用composer安装包

在composer.json中添加CleentfaarDoctrineTablePrefixBundle

{
    "require": {
        "cleentfaar/doctrine-table-prefix-bundle": "*"
    }
}

现在运行以下命令告诉composer下载包

$ php composer.phar update cleentfaar/doctrine-table-prefix-bundle

Composer将包安装到您的项目的vendor/cleentfaar目录。

2) 启用包

在kernel中启用包

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Cleentfaar\Bundle\DoctrineTablePrefixBundle\CleentfaarDoctrineTablePrefixBundle(),
    );
}

默认前缀为"sf_"。

您可以在配置中更改前缀

# app/config/config.yml
cleentfaar_doctrine_table_prefix:
    prefix: sf_