Skip to content

Instantly share code, notes, and snippets.

@weaverryan
Created May 12, 2011 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weaverryan/968411 to your computer and use it in GitHub Desktop.
Save weaverryan/968411 to your computer and use it in GitHub Desktop.
Pending Service Container Documentation Todos

The service container chapter itself is probably (at least) nearly content-complete. There are many other things (and service options) still to cover on the topic, however, and I think these should become a part of an advanced service container cookbook article:

  • property injection
  • file
  • calls
  • factory_class, factory_method
  • configurator
  • abstract
  • synthetic
  • scopes
  • parent
  • public
  • alias

Some of this list may be out of date or be missing new features.

@stof
Copy link

stof commented May 12, 2011

calls should probably be presented in the chapter itself as setter injection is not more advanced than constructor injection, just a different way to inject.

@weaverryan
Copy link
Author

I agree with that. And probably - without going into too much theoretical detail - we should mention how constructor injection is usually for required deps and setter injection for optional deps.

@Shurakai
Copy link

For factory_class, factory_method this service

service id="doctrine.dbal.connection" class="%doctrine.dbal.connection.class%" factory-service="doctrine.dbal.connection_factory" factory-method="createConnection" abstract="true" /

from DoctrineBundle might be a good example.

Additionally, I did "public", "alias", "file" today.

parent / abstract might belong together.

I don't know what synthetic is for or how scopes work, so I'd have to dig into that first - if anyone has got some free time, feel free to write it.

@richardmiller-zz
Copy link

I am happy to write up the factory stuff, parent/abstract and will have a look at synthetic and scope although I do need to look into the last two a bit more yet as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment