title: How can I return response from service controller?
body: <p>I have a controller using like service and I need to return an array response to the main controller.
  I don't know how to do it... </p>
  
  <p><strong>My service.yml:</strong></p>
  
  <pre><code>parameters:
      check.usuari.class: Acme\UsuariBundle\Controller\CheckUserController
  
  services:
      usuari:
          class: Acme\UsuariBundle\Controller\DefaultController
      check.usuari:
          class: "%check.usuari.class%"
  </code></pre>
  
  <p><strong>My controller (service):</strong></p>
  
  <pre><code>&lt;?php
  
  namespace Acme\UsuariBundle\Controller;
  
  use Symfony\Component\HttpFoundation\Response;
  use Symfony\Component\HttpFoundation\Request;
  use Symfony\Component\HttpFoundation\JsonResponse;
  
  use Acme\UsuariBundle\Entity\Usuari;
  
  class CheckUserController
  {
  
      public function isUserLoggedInAction(Request $request){
          $sessio = $request-&gt;getSession()-&gt;get('gesaudit');
          if(!$sessio){
              return new JsonResponse(array('error'=&gt;true));
          }
  
      }
  
  
  }
  </code></pre>
  
  <p><strong>My main controller:</strong></p>
  
  <pre><code>&lt;?php
  
  namespace Acme\IniciBundle\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Symfony\Component\Validator\Constraints\DateTime;
  
  use Acme\IniciBundle\Entity\FraseSabiesque;
  
  class DefaultController extends Controller
  {
  
      public function indexAction(){
  
  
          $asd = $this-&gt;forward('check.usuari:isUserLoggedInAction');
     }
  }
  ?&gt;
  </code></pre>
  
  <p>$asd variable doesn't show the array.
  I need to get array to show a view or another view.</p>