aboutcoders / file-distribution-bundle
文件分发 Symfony2 扩展包
1.1.11
2016-06-29 14:23 UTC
Requires
- php: >=5.3.2
- aboutcoders/file-distribution: ~1.0
- doctrine/doctrine-fixtures-bundle: ~2.0
- gedmo/doctrine-extensions: ~2.0
- symfony/symfony: ~2.6|~3.0
Requires (Dev)
- doctrine/doctrine-bundle: ~1.2
- doctrine/orm: ~2.2,>=2.2.3
- phpunit/phpunit: ~4
- symfony/monolog-bundle: ~2
README
AbcFileDistributionBundle 为 Symfony 提供了一个基于数据库的文件管理系统。它为您提供了灵活的框架来存储和在不同位置(本地、FTP、CDN)之间传输文件。它建立在 AbcFileDistribution 库之上。
概述
此扩展包提供以下功能
- 可以通过 Doctrine ORM、MongoDB/CouchDB ODM 或 Propel 存储文件系统定义
- 可以在配置中定义文件系统定义
- 单元测试
如果您决定使用此扩展包,我们将非常感激,并期待您的反馈、建议或贡献。
安装
将 AbcFileDistributionBundle 添加到您的 composer.json
文件中
{ "require": { "aboutcoders/file-distribution-bundle": "~1.1" } }
然后包含 AppKernel.php 类中的扩展包
public function registerBundles() { $bundles = array( // ... new Abc\Bundle\FileDistributionBundle\AbcFileDistributionBundle(), ); return $bundles; }
配置
配置 doctrine orm
目前仅支持 doctrine 作为 ORM。但是,通过更改配置,您可以使用不同的持久化层。
abc_file_distribution: db_driver: orm filesystems: assets: type: LOCAL path: "%data_dir%/assets" options: create: true
更新数据库模式
最后,您需要更新数据库模式以创建所需的表。
php app/console doctrine:schema:update --force
进一步文档
待办事项
- 更新文档
关于
AbcFileDistributionBundle 是 AboutCoders 的一项倡议。