alexkomaralex/file-search-bundle

允许通过内容递归查找文件。

安装: 10

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

dev-master 2016-02-01 11:42 UTC

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