ats / core-bundle
2.1.0
2019-05-15 11:44 UTC
Requires
- php: >=7.0
- alcaeus/mongo-php-adapter: ^1.1
- doctrine/mongodb-odm: ^1.2
- doctrine/mongodb-odm-bundle: ^3.4
- symfony/config: ~3.4.0
- symfony/console: ~3.4.0
- symfony/dependency-injection: ~3.4.0
- symfony/event-dispatcher: ~3.4.0
- symfony/filesystem: ~3.4.0
- symfony/finder: ~3.4.0
- symfony/http-foundation: ~3.4.0
- symfony/http-kernel: ~3.4.0
- symfony/monolog-bundle: ^3.1.0
- symfony/polyfill-apcu: ^1.0
- symfony/property-access: ~3.4.0
- symfony/routing: ~3.4.0
- symfony/serializer: ~3.4.0
- symfony/stopwatch: ~3.4.0
- symfony/yaml: ~3.4.0
Requires (Dev)
- phpstan/phpstan: ^0.11
- phpstan/phpstan-deprecation-rules: ^0.11
- phpstan/phpstan-symfony: ^0.11
- squizlabs/php_codesniffer: ^3.3
- symfony/browser-kit: ~3.4.0
- symfony/css-selector: ~3.4.0
- symfony/debug: ~3.4.0
- symfony/dom-crawler: ~3.4.0
- symfony/framework-bundle: ~3.4.0
- symfony/phpunit-bridge: ~3.4.0
- symfony/process: ~3.4.0
- symfony/var-dumper: ~3.4.0
- symfony/web-server-bundle: ~3.4.0
Provides
- ext-mongo: *
README
一般
核心技术特性,其他 ATS 包的基础
特性 & 功能
CSVResponse 类型
- ✔️ 在 Symfony 的 Response 对象之上提供包装器,用于处理 CSV 下载
命令
- ✔️ 命令事件订阅者
- ✔️ Doctrine MongoDB Bad References Check 命令
管理器
- AbstractBaseManager 用于模式强制
服务 & 工具
- ️✔ 字符串包装/助手类
设置
1- 更新你的 composer.json 以添加 ATS 私有 Packagist
{
"repositories": [
{
"type": "composer",
"url": "https://packagist.ats-digital.com"
}
],
}
2- 在你的应用程序中安装此包
$ php composer require ats/core-bundle
3- 在 AppKernel 中注册该包
<?php
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = [
// ...
new Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle(),
new ATS\CoreBundle\ATSCoreBundle(),
// ...
];
}
// ...
}
配置
N/A
如何做
Q: 如何启用 MongoDB 全文搜索?
A
- 在 Document 类上添加注释
/** * @ODM\Document() * @ODM\Index(keys={"username"="text"}) * ... */
- 更新数据库索引