Hey Lorenx, yes, that's the idea. The container takes care of configuring and holding a reference to whatever objects you configure it to hold.
Daniel On Nov 11, 8:29 am, lorenx <[email protected]> wrote: > hi all, > i read the dependency injection documentation again and i'm trying to > understand how to port it to my app. > > let's say i have the following code in path/to/file.php. > $sc = new sfServiceContainerBuilder(); > $sc->register('user', 'sfUser'); > > can i access the (same) sfUser instance with > $user = $sc->user; > from anywhere in my project? > > i guess i miss something... > > On Nov 7, 5:23 pm, lorenx <[email protected]> wrote: > > > hi all, > > i'm trying to learn components and i'm > > readinghttp://components.symfony-project.org. > > > probably it is all my fault but i'm not able to find enough detailed > > instructions on how to install a component (where to place the > > component files) and how to "quickstart" with it (which lines of code > > to edit to port the component to my existing project). > > > all the installation section offers is the link to the download > > location and all the package README file says is: > > "It is a standalone component. To use it, you first need to register > > the autoloader. > > require_once '/path/to/lib/sfServiceContainerAutoloader.php'; > > sfServiceContainerAutoloader::register();" > > > does anyone have any "low-level" resources or hints? > > thanks very much! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
