cranberyxl/doctrine-manager-registry-silex-provider
Composer 安装命令:
composer require cranberyxl/doctrine-manager-registry-silex-provider
包简介
README 文档
README
Provides the ability to build 1 or more Doctrine ManafgerRegistries for use in your Silex project.
Composer
{
"require": {
"cranberyxl/doctrine-manager-registry-provider": "*"
}
}
Register
<?php use Silex\Provider\DoctrineManagerRegistryServiceProvider; $app = new Silex\Application(); $app->register(new DoctrineManagerRegistryServiceProvider(), array( 'doctrine.common.manager_registry.definitions' => array( 'mongodb' => array( 'connections' => array('default' => 'doctrine.mongodb.connection'), 'managers' => array('default' => 'doctrine.mongodb.dm'), 'default_connection' => 'default', 'default_manager' => 'default', 'proxy_interface_name' => 'Doctrine\ODM\MongoDB\Proxy\Proxy' // Defaults to Doctrine\Common\Proxy ) ), ));
Use
$app['form.document_type'] = $app->share(function(Application $app) { return new DocumentType($app['doctrine.common.manager_registry.map']['mongodb']); });
统计信息
- 总下载量: 98
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-02-11