News Feed
Sections




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

Fabien Potencier's Blog:
Symfony Service Container
March 31, 2009 @ 08:46:04

Following along the same line as some of his recent dependency injection articles, Fabien Potencier has posted two new articles dealing with a related feature of the Symfony 2 engine - the Symfony Service Container.

Until now in this series on Dependency Injection, we have talked about general concepts. The first two introductory articles were important to better understand the implementation we will talk about in this article and in the following ones. It is now time to dive into the Symfony 2 service container implementation. The Dependency Injection Container in Symfony is managed by a class named sfServiceContainer. It is a very lightweight class that implements the basic features we talked about in the last article.

In the first of the two posts he introduces the Container including some example code showing how you can integrate a Zend Framework component (Zend_Mail_Transport_Smtp) inside your Symfony application.

The second article builds on this and shows how to create a services interface with a sfServiceContainerBuilder object. The service takes in various options and injects them into the already-created Container for handling. In this instance, they pass in the mailing information which is passed off to the Container with the Zend_Mail_Transport_Smtp instance inside.

0 comments voice your opinion now!
symfony framework service container zendframework service


blog comments powered by Disqus

Similar Posts

Leo Buttiker's Blog: Trevi is online!

Felix Geisendörfer's Blog: Welcome to the Dark Side of Plugins in CakePHP

Technovated Blog: Reviewing a CMS solution developed on Mediatemple with Seagull including Paypal

Cal Evans' Blog: Book is Available, Support Site is Live

Felix Geisendofer's Blog: Screencast #1: Using vendor branching and CakePHP


Community Events

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


release video library framework laravel introduction opinion wordpress language psr7 api community interview unittest laravel5 extension series podcast development voicesoftheelephpant

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