Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [Symfony][SF2][SF]You have requested a non-existent service "pushsql".
symer
post 1.08.2018, 16:23:26
Post #1





Grupa: Zarejestrowani
Postów: 66
Pomógł: 0
Dołączył: 24.08.2017

Ostrzeżenie: (0%)
-----


Mam problem z wyciągnięciem z kontenera usługi. Otóż mam klasę:
AppBundle\Service\Edit\Append\PushSql.class jako usługę .
Rejestruje ją jako usługę w symfony 3.4 w config:
  1. pushsql:
  2. class: AppBundle\Service\Edit\Append\PushSql
  3. autowire: true


Próbuje wyciągnąć za pomoce kontenera:
  1. $pushsql=$this->container->get('pushsql');

I pokazuje mi się komunikat:

You have requested a non-existent service "pushsql".

Wiem, że mogę wrzucić to do argumentu konstruktora i tam ją wyciągnąć ale Ja Chcę tak ją wyciągnąć . Nie ważne dlaczego exclamation.gif! Więc proszę o pomoc
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 28.03.2024 - 11:52