Infos
- Status:
- Score: 32
- Required Symfony version: unknown
- Created: 2011-06-07
- Nb of contributors: 2
- Nb of followers: 27
- ddeboer/GuzzleBundle
Keywords
No keywords for this bundleRecommendations
Score evolution
Score details ( ? )
- Github Followers: 27
- Last 30 days activity: 0
- README file size: 5
- Uses Travis CI: 0
- Travis CI build status: 0
- Provides a composer package: 0
- KnpBundles recommendations: 0
Contributors
Latest commits
- Merge pull request #3 from patrick-mcdougle/patch-1By ddeboer 1 month ago
- Fixed indentation of the config.yml file.By patrick-mcdougle 1 month ago
- Merge pull request #1 from ftassi/masterBy ddeboer 7 months ago
- fixed autoloding configurationBy ftassi 7 months ago
- fix configuration exampleBy ftassi 7 months ago
- Hello worldBy ddeboer 11 months ago
32
GuzzleBundle by ddeboer
A Symfony2 bundle for integrating Guzzle, a PHP framework for building RESTful web service clients
GuzzleBundle
Introduction
GuzzleBundle is a Symfony2 bundle for integrating the Guzzle PHP library in your project.
It’s not quite finished.
Installation
Install Guzzle:
git submodule add git://github.com/guzzle/guzzle.git vendor/guzzle
Install GuzzleBundle:
git submodule add git://github.com/ddeboer/GuzzleBundle vendor/bundles/Ddeboer/GuzzleBundle
Autoloader
Add Guzzle and Ddeboer namespace to your autoloader:
// app/autoload.php
$loader->registerNamespaces(array(
// ...
'Guzzle' => __DIR__.'/../vendor/guzzle/src',
'Ddeboer' => __DIR__.'/../vendor/bundles',
// ...
));
Application kernel
Add GuzzleBundle to your application kernel:
// app/AppKernel.php
public function registerBundles()
{
// ...
new Ddeboer\GuzzleBundle\DdeboerGuzzleBundle(),
// ...
}
Configure the Guzzle service builder
// app/config/config.yml
ddeboer_guzzle:
service_builder:
configuration_file: "%kernel.root_dir%/config/webservices.xml"
cache:
adapter: doctrine
driver: apc
And add a Guzzle services configuration file. See the Guzzle documentation.
// app/config/webservices.xml
<?xml version="1.0" ?>
<guzzle>
<clients>
<!-- Abstract service to store AWS account credentials -->
<client name="abstract.aws">
<param name="access_key" value="12345" />
<param name="secret_key" value="abcd" />
</client>
<!-- Amazon S3 client that extends the abstract client -->
<client name="s3" classs="Guzzle.Aws.S3.S3Client" extends="abstract.aws">
<param name="devpay_product_token" value="XYZ" />
<param name="devpay_user_token" value="123" />
</client>
<client name="simple_db" class="Guzzle.Aws.SimpleDb.SimpleDbClient" extends="abstract.aws" />
<client name="sqs" class="Guzzle.Aws.Sqs.SqsClient" extends="abstract.aws" />
<!-- Unfuddle client -->
<client name="unfuddle" class="Guzzle.Unfuddle.UnfuddleClient">
<param name="username" value="test-user" />
<param name="password" value="my-password" />
<param name="subdomain" value="my-subdomain" />
</client>
</clients>
</guzzle>
