Skip to content

Service container docs, reference section #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
7 commits merged into from
Feb 17, 2011
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,20 @@ Glossary
A *Front Controller* is a short PHP that lives in the web directory
of your project. Typically, *all* requests are handled by executing
the same front controller, whose job is to bootstrap the Symfony
application.
application.

Service
A *Service* is a generic term for any PHP object that performs a
specific task. In Symfony2, services are often configured and retrieved
from the service container. An application that has many decoupled
services is said to follow a `service-oriented architecture`_

Service Container
A *Service Container*, also known as a *Dependency Injection Container*,
is a special object that manages the instantiation of services inside
an application. Instead of creating services directly, the developer
*trains* the service container (via configuration) on how to create
the services. The service container takes care of lazily instantiating
and injecting dependent services.

.. _`service-oriented architecture`: http://wikipedia.org/wiki/Service-oriented_architecture
1 change: 1 addition & 0 deletions guides/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Dive into Symfony2 with the topical guides:
event/index
tools/index
bundles/index
service_container/index
internals/index
symfony1
stable_api
Expand Down
2 changes: 1 addition & 1 deletion guides/internals/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Dependency Injection component and a powerful plugin system (bundles).
.. seealso::

Read more about the :doc:`HttpKernel <kernel>` component. Read more about
:doc:`Dependency Injection </guides/dependency_injection/index>` and
:doc:`Dependency Injection </guides/service_container/index>` and
:doc:`Bundles </guides/bundles/index>`.

``FrameworkBundle`` Bundle
Expand Down
5 changes: 3 additions & 2 deletions guides/map.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@
* :doc:`Best Practices </guides/bundles/best_practices>` |
* :doc:`Configuration </guides/bundles/configuration>`

* **Dependency Injection**:
* **Service Container**:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to keep the "Dependency Injection" title as we should first explain what DI is before what a DIC is.


* :doc:`Extensions </guides/dependency_injection/extensions>`
* :doc:`Service Container </guides/service_container/index>`
* :doc:`Extensions </guides/service_container/extensions>`

* **Internals**:

Expand Down
Loading