|
37 | 37 | class ValidationModule implements Module {
|
38 | 38 |
|
39 | 39 | public function configure(Binder $binder) {
|
40 |
| - $binder->bind('ValidationService')->to('DefaultValidationService')->inRequestScope(); |
| 40 | + $binder->bind('ValidationService')->to('DefaultValidationService'); |
41 | 41 |
|
42 |
| - $binder->bind('ValidationInterceptor')->inRequestScope(); |
| 42 | + $binder->bind('ValidationInterceptor'); |
43 | 43 | $binder->interceptWith('ValidationInterceptor')->on(new ValidationPointcut());
|
44 | 44 |
|
45 |
| - $binder->bind('Validator')->annotatedWith('IsNumeric')->to('IsNumericValidator')->inRequestScope(); |
46 |
| - $binder->bind('Validator')->annotatedWith('IsText')->to('IsTextValidator')->inRequestScope(); |
47 |
| - $binder->bind('Validator')->annotatedWith('Match')->to('MatchValidator')->inRequestScope(); |
48 |
| - $binder->bind('Validator')->annotatedWith('MaxNumber')->to('MaxNumberValidator')->inRequestScope(); |
49 |
| - $binder->bind('Validator')->annotatedWith('MaxText')->to('MaxTextValidator')->inRequestScope(); |
50 |
| - $binder->bind('Validator')->annotatedWith('MinNumber')->to('MinNumberValidator')->inRequestScope(); |
51 |
| - $binder->bind('Validator')->annotatedWith('MinText')->to('MinTextValidator')->inRequestScope(); |
52 |
| - $binder->bind('Validator')->annotatedWith('NotEmpty')->to('NotEmptyValidator')->inRequestScope(); |
53 |
| - $binder->bind('Validator')->annotatedWith('NotNull')->to('NotNullValidator')->inRequestScope(); |
| 45 | + $binder->bind('Validator')->annotatedWith('IsNumeric')->to('IsNumericValidator'); |
| 46 | + $binder->bind('Validator')->annotatedWith('IsText')->to('IsTextValidator'); |
| 47 | + $binder->bind('Validator')->annotatedWith('Match')->to('MatchValidator'); |
| 48 | + $binder->bind('Validator')->annotatedWith('MaxNumber')->to('MaxNumberValidator'); |
| 49 | + $binder->bind('Validator')->annotatedWith('MaxText')->to('MaxTextValidator'); |
| 50 | + $binder->bind('Validator')->annotatedWith('MinNumber')->to('MinNumberValidator'); |
| 51 | + $binder->bind('Validator')->annotatedWith('MinText')->to('MinTextValidator'); |
| 52 | + $binder->bind('Validator')->annotatedWith('NotEmpty')->to('NotEmptyValidator'); |
| 53 | + $binder->bind('Validator')->annotatedWith('NotNull')->to('NotNullValidator'); |
54 | 54 | }
|
55 | 55 | }
|
0 commit comments