baldeweg / book-bundle
此包已被弃用且不再维护。未建议替代包。
提供书籍管理的工具。
v0.4.0
2022-03-10 11:45 UTC
Requires
- php: >=8.1
- doctrine/orm: ^2.9
- symfony/config: ^5.4|^6.0
- symfony/dependency-injection: ^5.4|^6.0
- symfony/http-kernel: ^5.4|^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^9.5
- rector/rector: ^0.12
- symfony/browser-kit: ^5.4|^6.0
- symfony/maker-bundle: ^1.31
- symfony/var-dumper: ^5.4|^6.0
README
提供书籍管理的工具。
入门指南
composer req baldeweg/book-bundle
在您的 config/bundles.php
中激活此包,如果尚未自动完成。
Baldeweg\Bundle\BookBundle\BaldewegBookBundle::class => ['all' => true],
构建新的查询。
use Baldeweg\Bundle\BookBundle\Search\Find; $find = new Find($em, $term, $filter, $orderBy); $find->setFields([]); $find->setForcedFilters([]); $find->find();
选项
查询
- term - 字符串,操作符:like
- filter - array
- orderBy - array
- book - array
- author - array
- book - array
- limit - 整数
- offset - 整数
过滤器
- genre - array
,操作符:in - lendOn - 整数,操作符:eq,gte,gt,lte,lt,null
- branches - 整数,操作符:eq
- releaseYear - 整数,操作符:eq,gte,gt,lte,lt,null
- sold - 布尔值,操作符:eq
- removed - 布尔值,操作符:eq
- type - 字符串,操作符:eq
- added - 整数,操作符:eq,gte,gt,lte,lt,null
排序
- field - 字符串
- direction - 字符串