Код: Выделить всё
parameters:
locale: 'en'
localhost_base_url: '%env(string:localhost_base_url)%'
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
public: false
# makes classes in src/MlngAppBundle/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
MlngApp\MlngAppBundle\:
resource: '../src/MlngApp/MlngAppBundle/*'
exclude:
- '../src/MlngApp/MlngAppBundle/MlngAppBundle.php'
- '../src/MlngApp/MlngAppBundle/{Common,Event,Location,People,User}/Domain/{Entity,Dto,Exception,Invariant}/*'
- '../src/MlngApp/MlngAppBundle/{Common,Event,Location,People,User}/Tests/*'
- '../src/MlngApp/MlngAppBundle/{Common,Event,Location,People,User}/Infrastructure/CommandLine/*'
Код: Выделить всё
imports:
- { resource: domains/* }
- { resource: "@MlngAppBundle/Common/Infrastructure/Resources/config/services.xml" }
- { resource: "@MlngAppBundle/Location/Infrastructure/Resources/config/services.xml" }
< /code>
и файл "Common" services.xml: < /p>
namespace="MlngApp\MlngAppBundle\"
resource="../../../../../../../src/MlngApp/MlngAppBundle/{Common,Event,Location,People,User}/Infrastructure/Repository/"
autoconfigure="true"
autowire="true"
public="true"
>
conconfig/routes.yaml
Код: Выделить всё
location:
resource: "@MlngAppBundle/Location/Api/Resources/config/routing.xml"
prefix: /api
type: xml
shrong>@mlngappbundle/location/api/resources/config/routing.xml
Код: Выделить всё
MlngApp/MlngAppBundle/Location/Api/Controller/AnotherController::anotherEndpoint
< /code>
и контроллер: < /p>
Подробнее здесь: [url]https://stackoverflow.com/questions/72897614/the-controller-for-uri-is-not-callable-controller-does-neither-exist-as-service[/url]
Мобильная версия