Resources/config/services.yaml
services:
# Extends symfony router to make sure that all routes work as files (e.g. add .html suffix).
Fw\LastBundle\Router\FileSuffixRouter:
parent: router
decorates: router
# Generates files from routes. dist_folder argument will be replaced by config.
fw_last.site_generator:
class: Fw\LastBundle\Service\SiteGenerator
public: true
arguments: ['@kernel', '@router', '@filesystem']
# Holds all routes that got registered by fw.last.rout_providers.
fw.last.route_manager:
class: Fw\LastBundle\Router\RouteManager
public: true
# A symfony console command to dump response for all routes to dist folder.
Fw\LastBundle\Command\DumpCommand:
arguments: ['@fw.last.route_manager', '@fw_last.site_generator', '@filesystem', '%kernel.project_dir%/dist']
tags: ['console.command']
# A provider for all defined routes without placeholders.
Fw\LastBundle\Router\Provider\StaticProvider:
arguments: [true, '@router']
tags: ['fw.last.route_provider']