{% extends '../base.html.twig' %}

{% block body %}
  <div class="container-fluid">
    <div class="row flex-xl-nowrap">
      {% include '../../documentation/navbar.html.twig' with {
        'route' : nodefony.route
      } %}
      <main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5" style="top: 5rem;">
        <h1><strong>Services and Container</strong> </h1>

        <div class="doc2">

        	<div class="well" >

        		<h2>
        			<strong>
                <a href="{{ url("nodefony-doc-index",{section:"container",subsection:"services"}) }}">
                  {{"Services Nodefony" | trans() | capitalize() }}
                </a>
        			</strong>
        		</h2>
        		<div class="doc2">
        			<p style="font-weight: bold;">
        				A service is an entity that can perform a work .  </br>
        				It's a kind of global task. A service is global to your application.  </br>

        				A service provides good Maintenance and factorization of code </br>
        			</p>
        			<p>
        					<img src="/documentation-bundle/images/services.png" />
        			</p>
        		</div>
        	</div>

        	<div class="well" >
        		<h2><strong>
              <a href="{{ url("nodefony-doc-index",{section:"container",subsection:"containerServices"}) }}">
                {{"Services Container Nodefony" | trans() | capitalize() }}
              </a>
        		</strong></h2>
        		<div class="doc2">
        			<p style="font-weight: bold;">
        				This container manage two differents entities the services and the parameters. </br>
        				This container allows us to retrieve services and parameters to any level of codes. </br>
        				This one allows us to use the design pattern of dependency injections.
        			</p>
        			<p>
        					<img src="/documentation-bundle/images/container.png" />
        			</p>
        		</div>


        	</div>

        	<div class="well" >
        		<h2>
        			<strong>
                <a href="{{ url("nodefony-doc-index",{section:"container",subsection:"injection"}) }}">
                  {{"Dependency Injections" | trans() | capitalize() }}
                </a>
        			</strong>
        		</h2>
        		<div class="doc2">
        			<p style="font-weight: bold;">
        				Nodefony can manage all services by injection .</br>
        				During startup , autoloader load services and read config file services.js in bundle.<br>
        				This Part look in container global to find services to inject  and register new service in the container.<br>
        				The injection service is completely linked with the kernel service container
        			</p>
        			<p>
        				<img src="/documentation-bundle/images/injector.png" />
        			</p>
        		</div>
        	</div>
        </div>

      </main>
    </div>
  </div>
{% endblock %}
