Separate generation concerns into different services

This commit is contained in:
Jeremy Livingston
2012-12-03 18:48:32 -05:00
parent ba9e0818a5
commit ce1b590ae9
5 changed files with 356 additions and 230 deletions

View File

@ -1,6 +1,4 @@
services:
# captcha type
captcha.type:
class: Gregwar\CaptchaBundle\Type\CaptchaType
arguments:
@ -15,7 +13,16 @@ services:
arguments:
- @session
- @router
- @gregwar_captcha.image_builder
- @gregwar_captcha.image_file_handler
gregwar_captcha.image_file_handler:
class: Gregwar\CaptchaBundle\Generator\ImageFileHandler
arguments:
- %gregwar_captcha.config.image_folder%
- %gregwar_captcha.config.web_path%
- %gregwar_captcha.config.gc_freq%
- %gregwar_captcha.config.expiration%
- %gregwar_captcha.config.expiration%
gregwar_captcha.image_builder:
class: Gregwar\CaptchaBundle\Generator\ImageBuilder