vertigolabs / doctrine-full-text-postgres-bundle
VertigoLabs DoctrineFullTextPostgres 包的扩展包
v1.0.3
2015-09-20 15:46 UTC
Requires
This package is auto-updated.
Last update: 2024-09-05 18:41:24 UTC
README
Symfony2 扩展包,用于 DoctrineFullTextPostgres 包
安装
将 DoctrineFullTextPostgresBundle 添加到你的 composer.json 文件中
{ "require": { "vertigolabs/doctrine-full-text-postgres-bundle": "v1.0" } }
或直接使用 composer 引入
$ php composer.phar require vertigolabs/doctrine-full-text-postgres-bundle:v1.0
该扩展包将被安装在你的项目的 vendor 目录下,路径为 vertigolabs/doctrine-full-text-postgres-bundle/
启用
将扩展包添加到你的内核中
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( //... new VertigoLabs\DoctrineFullTextPostgresBundle(), ); }
配置 Doctrine
# Doctrine Configuration doctrine: dbal: types: tsvector: VertigoLabs\DoctrineFullTextPostgres\DBAL\Types\TsVector mapping_types: tsvector: tsvector orm: entity_managers: default: dql: string_functions: tsquery: VertigoLabs\DoctrineFullTextPostgres\ORM\Query\AST\Functions\TsQueryFunction tsrank: VertigoLabs\DoctrineFullTextPostgres\ORM\Query\AST\Functions\TsRankFunction tsrankcd: VertigoLabs\DoctrineFullTextPostgres\ORM\Query\AST\Functions\TsRankCDFunction services: vertigolabs.doctrinefulltextpostgres.listener: class: VertigoLabs\DoctrineFullTextPostgres\Common\TsVectorSubscriber tags: - { name: doctrine.event_subscriber, connection: default }
使用方法
有关 DoctrineFullTextPostgres 包的使用说明,请参考 read me