phlexible / indexer-bundle
phlexible 索引器包
1.1.6
2018-07-27 09:21 UTC
Requires
- php: >=5.6.0
- doctrine/collections: ^1.3
- symfony/event-dispatcher: ^2.8
Requires (Dev)
- phlexible/queue-bundle: ~1.3
- phpunit/phpunit: ^5.7
Suggests
- phlexible/indexer-storage-elastica-bundle: Elastica indexer storage
README
PhlexibleIndexerBundle 为 phlexible 添加了内容索引支持。
安装
- 使用 composer 下载 PhlexibleIndexerBundle
- 启用 Bundle
- 导入 PhlexibleIndexerBundle 路由
- 清除 symfony 缓存
步骤 1:使用 composer 下载 PhlexibleIndexerBundle
运行命令添加 PhlexibleIndexerBundle
$ php composer.phar require phlexible/indexer-bundle "~1.0.0"
Composer 会将包安装到项目的 vendor/phlexible
目录。
步骤 2:启用 Bundle
在 Kernel 中启用 Bundle
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Phlexible\Bundle\IndexerBundle\PhlexibleIndexerBundle(), ); }
步骤 3:导入 PhlexibleIndexerBundle 路由
导入 PhlexibleIndexerBundle 路由。
# app/config/routing.yml phlexible_indexer: resource: "@PhlexibleIndexerBundle/Controller/" type: annotation
步骤 4:清除 symfony 缓存
如果您的 phlexible 应用程序运行在 prod 环境中,请清除缓存
$ php app/console cache:clear --env=prod