alexkomaralex / file-search-bundle
允许通过内容递归查找文件。
dev-master
2016-02-01 11:42 UTC
Requires
- php: >=5.3.0
- ext-mbstring: *
- symfony/config: ~2.5
- symfony/console: ~2.5
- symfony/dependency-injection: ~2.5
- symfony/yaml: ~2.5
Requires (Dev)
- phpunit/phpunit: >=3.7.0
- symfony/browser-kit: ~2.5
- symfony/debug: ~2.5
- symfony/framework-bundle: ~2.5
This package is not auto-updated.
Last update: 2024-09-14 16:36:49 UTC
README
AlexkomaralexFileSearchBundle 允许在 Symfony2 中通过内容搜索文件。它提供了一个灵活的接口来处理不同的搜索适配器。
功能包括
- 控制台命令
- Symfony 查找适配器
- PHP 目录迭代器适配器
- 单元/功能性测试
#安装
- 通过 composer 安装包
composer require alexkomaralex/file-search-bundle dev-master
- 在 AppKernel.php 中启用包
new Alexkomaralex\FileSearchBundle\AlexkomaralexFileSearchBundle()
#配置
使用原始 services.yml 作为示例。
定义任何新的搜索适配器作为服务并将其注入到搜索命令服务中,或者使用预定义的适配器之一。
#使用方法
php app/console fsearch:find [--path=PATH] <查询>
- path - 查找位置
- query - 查找内容
示例:php app/console fsearch:find --path=app/config database