guilhermednt / hwi-oauth-proxy-bundle
用于启用HWIOAuthBundle代理的扩展包
dev-master
2014-03-12 17:47 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-09-12 03:36:02 UTC
README
此扩展包扩展了HWIOAuthBundle,以便能够从Buzz扩展Curl客户端。
安装
步骤 1: 在Composer中添加包作为需求
将扩展包添加到您的 composer.json
{ "require": { "guilhermednt/hwi-oauth-proxy-bundle": "dev-master" } }
然后运行更新命令
$ composer update guilhermednt/hwi-oauth-proxy-bundle
步骤 2: 告诉Symfony2有关它。
在您的 AppKernel.php 中启用扩展包
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Donato\Generic\HWIOAuthProxyBundle\DonatoGenericHWIOAuthProxyBundle(), ); }
步骤 3: 添加所需参数
此扩展包不需要您更改 config.yml,因此您可以为每个环境拥有不同的配置场景。
所需的最小配置如下
# app/config/parameters.yml parameters: http_proxy: ~
下面你可以看到一个 示例,用于 带有身份验证的HTTP代理
# app/config/parameters.yml imports: - { resource: constants.php } parameters: # ... your regular parameters ... http_proxy: type: HTTP host: my.proxy.example.com port: 1234 auth: username:password
就这样!
现在您可以使用 HWIOAuthBundle 正常工作,并且它将在您的代理后面工作!