brilo-example/config/services.yaml

50 lines
1.8 KiB
YAML
Raw Normal View History

2024-07-29 11:38:42 +00:00
# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
parameters:
list.page.size: 24
list.page.max_visible_pages: 3
brilo.api.comments: 'https://jsonplaceholder.typicode.com/comments'
brilo.api.posts: 'https://jsonplaceholder.typicode.com/posts'
brilo.api.users: 'https://jsonplaceholder.typicode.com/users'
2024-07-29 11:38:42 +00:00
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.
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/'
exclude:
- '../src/DependencyInjection/'
- '../src/Entity/'
- '../src/Kernel.php'
App\Command\RefreshDatabaseCommand:
arguments:
$name: "brilo:refresh-database"
App\Controller\ListPostController:
arguments:
$pageSize: '%list.page.size%'
$maxVisiblePages: '%list.page.max_visible_pages%'
App\Service\Remote\BriloApiComments:
arguments:
$url: '%brilo.api.comments%'
App\Service\Remote\BriloApiPosts:
arguments:
$url: '%brilo.api.posts%'
App\Service\Remote\BriloApiUsers:
arguments:
$url: '%brilo.api.users%'
2024-07-29 11:38:42 +00:00
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones