News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Gonzalo Ayuso:
Handling several DBALs in Symfony2 through the Dependency Injection with PHP
January 16, 2013 @ 10:47:32

Gonzalo Ayuso has a second post in his series looking at using the Symfony2 dependency injection container with Doctrine functionality. In his previous post he talked about sharing PDO connections via the DIC. In this latest one it's focused on the sharing of DBALs from Doctrine.

OK. We can handle PDOs connections inside a Symfony2 application, but what happens if we prefer DBAL. As we know DBAL is built over PDO and adds a set of "extra" features to our database connection. It's something like PDO with steroids.

He includes the (PHP) configuration to set up the DBAL and the YAML definition to set it up in the DIC's configuration. As an update to the post, he also points out a bundle for Symfony2 that lets Doctrine do this natively - check out this documentation on github.

0 comments voice your opinion now!
dependency injection dic symfony2 doctrine dbal tutorial


blog comments powered by Disqus

Similar Posts

PHPMaster.com: Working with Multibyte Strings

PHPMac.com: Building and Installing Apache 2.2.2 and PHP 5.1.3 (or 5.1.4) on Mac OS X 10.4.6

Stoimen.com: Iterate over YouTube Channel with Zend_Gdata_YouTube

FrSIRT: Vivvo Article Management CMS SQL Injection and PHP File Inclusion Vulnerabilities

DeveloperTutorials.com: AJAX and PHP Form Processing


Community Events





Don't see your event here?
Let us know!


release install list configure series community podcast laravel symfony2 threedevsandamaybe testing developer refactor opinion language introduction framework code unittest interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework